Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Date Parameter Form

Questions related to using nuBuilder Forte.
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Date Parameter Form

Unread post 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
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Date Parameter Form

Unread post 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);
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Date Parameter Form

Unread post by kev1n »

Hi,

Another possibility is to embed a browse form (type "run" object, method iframe)

viewtopic.php?p=26599
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Date Parameter Form

Unread post 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..
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Date Parameter Form

Unread post by kev1n »

Add some custom code for that field:
set_date_value.png
You do not have the required permissions to view the files attached to this post.
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Date Parameter Form

Unread post by acroporax »

Thank you so much
acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Date Parameter Form

Unread post by acroporax »

I need a sample project for learn. How to get sample project?
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Date Parameter Form

Unread post by kev1n »

acroporax
Posts: 42
Joined: Thu Apr 21, 2022 3:04 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Date Parameter Form

Unread post by acroporax »

Hi,
I added onnuload script. But Always work. I want to work for when only new record adding.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Date Parameter Form

Unread post by kev1n »

Code: Select all

if (nuIsNewRecord()) {
   // your code here...
}
Post Reply