Welcome to the nuBuilder Forums!

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

Default value in subform

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Default value in subform

Unread post by kev1n »

To sort the rows, you add the ORDER BY clause in the SELECT statement.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Default value in subform

Unread post by Janusz »

On one form lets say Form_1 I have a button with run command to open other form lets say Form_2 to enter a new record on it.
To have blank form I use - non existing value in the search field. And later I have to choose manually the reference with the "Lookup".

so the question - how to set on Form_2 in just in one field a value taken from the Form_1.

(So after Button press on Form_1 to have following sequence -> read value from Object_A on Form_1 -> Open Form_2 -> set value on Form_2 / Object_X = Object_A )
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Default value in subform

Unread post by kev1n »

Janusz wrote:On one form lets say Form_1 I have a button with run command to open other form lets say Form_2 to enter a new record on it.
To have blank form I use - non existing value in the search field. And later I have to choose manually the reference with the "Lookup".

so the question - how to set on Form_2 in just in one field a value taken from the Form_1.

(So after Button press on Form_1 to have following sequence -> read value from Object_A on Form_1 -> Open Form_2 -> set value on Form_2 / Object_X = Object_A )
Is this question related to "Default value in subform"? It's better to create a new topic instead of asking different kind of questions in one thread.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Default value in subform

Unread post by kev1n »

Janusz wrote:And one more question for subforms. What would be the best way to define default sorting order by a specific column?
Add an ORDER BY clause in the SQL.
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Re: Default value in subform

Unread post by treed »

I'm trying to do this too. Where I'm stuck is that there is no SQL I can find. There is a place to put in a table name. I tried the name of a saved SQL query and just got blank records. So where is this SQL that can be edited in a subform???

Tom
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Default value in subform

Unread post by Janusz »

Tom,
So where is this SQL that can be edited in a subform???
When you open subform object then in the Subform Tab you will have Form Lookup - where the first field is Form_id and the second is the form name.
Copy the first field (form id).
Next go to the nuHome choose Form tab and find the (sub)form with id copied just before.
When you open it you will see just typical form with sql and other options.

Janusz
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Default value in subform

Unread post by kev1n »

With Clicks: Click 3 dots of the subform, click "Form Properties", select "Browse"
You do not have the required permissions to view the files attached to this post.
Post Reply