Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

nuForm Filter

Questions related to using nuBuilder Forte.
Locked
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

nuForm Filter

Unread post by Timo »

With

Code: Select all

nuForm('nuobject','',window.nuFORM.getCurrent().form_id,'',2)
I open the object form of the current form in a new tab.
nuForm(string1, string2, string3, string4, string5)
string1 : Form id
string2 : record id of the Edit Form or an empty string to display a Browse Form.
string3 : Filter string
string4 : Search string
string5 : '0', '1' or '2'
But the browse form that opens shows all rows (objects) and the filter is ignored.

The sql of the browse form ( nuCurrentProperties.browse_sql ) doesn't show the filter in the where clause either:

Code: Select all

SELECT zzzzsys_object_id,sob_all_type,sob_input_type,sob_all_id,zzzzsys_form_id,sob_all_label,sfo_description,syt_title
 FROM zzzzsys_object JOIN ___nu15af30a389f2bc___ ON zzzzsys_object_id = theid JOIN zzzzsys_tab ON zzzzsys_tab_id = sob_all_zzzzsys_tab_id JOIN zzzzsys_form ON zzzzsys_form_id = syt_zzzzsys_form_id
WHERE 1
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuForm Filter

Unread post by admin »

Timo,

Where are you running nuForm()?

Steven
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: nuForm Filter

Unread post by Timo »

From the console or a button on a form. I verified that window.nuFORM.getCurrent().form_id is not empty
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuForm Filter

Unread post by admin »

Timo,

If you use a Run Object it will work.
run3.PNG
run1.PNG
run2.PNG


Steven
You do not have the required permissions to view the files attached to this post.
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: nuForm Filter

Unread post by Timo »

Note the parameter 2: open in a new tab. Where would this go using a run button?

Code: Select all

nuForm('nuobject','',window.nuFORM.getCurrent().form_id,'',2)

My initial question put a bit in differently: How do I open a browse form, with a filter criteria, in a new tab?

When I run this, the filter is applied:

Code: Select all

nuForm('nuobject','',window.nuFORM.getCurrent().form_id,'',1)
When I run this, the filter is not applied:

Code: Select all

nuForm('nuobject','',window.nuFORM.getCurrent().form_id,'',2)
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuForm Filter

Unread post by admin »

Timo,

I don't understand your question...
How do I open a browse form, with a filter criteria, in a new tab?
What do you mean by "in a new tab"

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuForm Filter

Unread post by toms »

2 = Open Form in a new window
A new window is usually opened in a new browser tab, this is my.understanding.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuForm Filter

Unread post by admin »

Timo,

If you grab the latest GitHub that should work now.

Please test it.

Steven
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: nuForm Filter

Unread post by Timo »

Works, thank you.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuForm Filter

Unread post by admin »

.
Locked