Page 1 of 2
Date Parameter Form
Posted: Tue May 17, 2022 1:35 pm
by acroporax
Hi All,
How i make this;
User open form and select date then open table data for filter selected date.
My english is not very well so sorry
Finally
I want to open table for date filtering before open
Re: Date Parameter Form
Posted: Tue May 17, 2022 2:03 pm
by acroporax
I Solved.But I don't know if my method is best practice!
1-I create 1 table and user,begindate include fields.
2 I create 1 form for this table.
3 i wrote bellow code for forms before save
$s="delete from Parameter where User='#USER_ID#'";
$t = nuRunQuery($s);
$s="INSERT INTO Parameter(User,BeginDate) values( '#USER_ID#','#Beg_date')";
$t = nuRunQuery($s);
Re: Date Parameter Form
Posted: Tue May 17, 2022 3:02 pm
by kev1n
Hi,
Another possibility is to embed a browse form (type "run" object, method iframe)
viewtopic.php?p=26599
Re: Date Parameter Form
Posted: Wed May 18, 2022 12:06 pm
by acroporax
Another question, How to set the default value for this field? Sample: I am set to today for this format(yyyy-mm-dd)
I ask a lot of questions but I only worked with c#. And now I need to learn nubuilder..
Re: Date Parameter Form
Posted: Wed May 18, 2022 12:11 pm
by kev1n
Add some custom code for that field:
set_date_value.png
Re: Date Parameter Form
Posted: Wed May 18, 2022 1:46 pm
by acroporax
Thank you so much
Re: Date Parameter Form
Posted: Wed May 18, 2022 1:47 pm
by acroporax
I need a sample project for learn. How to get sample project?
Re: Date Parameter Form
Posted: Wed May 18, 2022 1:49 pm
by kev1n
Re: Date Parameter Form
Posted: Thu Jun 09, 2022 12:43 pm
by acroporax
Hi,
I added onnuload script. But Always work. I want to work for when only new record adding.
Re: Date Parameter Form
Posted: Thu Jun 09, 2022 12:57 pm
by kev1n
Code: Select all
if (nuIsNewRecord()) {
// your code here...
}