Page 1 of 1

nuForm Filter

Posted: Wed May 09, 2018 4:54 pm
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

Re: nuForm Filter

Posted: Thu May 10, 2018 1:29 am
by admin
Timo,

Where are you running nuForm()?

Steven

Re: nuForm Filter

Posted: Thu May 10, 2018 7:26 am
by Timo
From the console or a button on a form. I verified that window.nuFORM.getCurrent().form_id is not empty

Re: nuForm Filter

Posted: Thu May 10, 2018 9:05 am
by admin
Timo,

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


Steven

Re: nuForm Filter

Posted: Thu May 10, 2018 9:45 am
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)

Re: nuForm Filter

Posted: Fri May 11, 2018 6:24 pm
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

Re: nuForm Filter

Posted: Fri May 11, 2018 6:32 pm
by toms
2 = Open Form in a new window
A new window is usually opened in a new browser tab, this is my.understanding.

Re: nuForm Filter

Posted: Fri May 11, 2018 8:36 pm
by admin
Timo,

If you grab the latest GitHub that should work now.

Please test it.

Steven

Re: nuForm Filter

Posted: Fri May 11, 2018 9:48 pm
by Timo
Works, thank you.

Re: nuForm Filter

Posted: Fri May 11, 2018 11:32 pm
by admin
.