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.

How to retrieve filter in edit form

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

How to retrieve filter in edit form

Unread post by Timo »

There's a run button that opens a browse form with a given filter (e.g. Google)
filter_run.png
While the browse form is open, the filter can be retrieved with nuCurrentProperties().filter
Then I set a Hash Cookie with nuSetProperty:

Code: Select all

if (nuFormType() == 'browse') {
   nuSetProperty('project', nuCurrentProperties().filter);
}
When a record is selected from the browse table, the edit form is shown. Now I'm trying to get this hash cookie with nuGetProperty but it gives me an empty result.

Code: Select all

if (nuFormType() == 'edit') {
   alert(nuGetProperty('project'));
}
What I'm trying to get is the filter of the browse form while the edit form is shown. Or is there a method like previousForm.filter ? (the previous form would be a reference to the browse form)
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: How to retrieve filter in edit form

Unread post by toms »

Hi,

sessionStorage.setItem(), sessionStorage.getItem() should do the job, unless there is a better way, of course.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: How to retrieve filter in edit form

Unread post by admin »

Timo,

Try this...

Code: Select all

nuFORM.breadcrumbs[nuFORM.breadcrumbs.length - 2].filter

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

Re: How to retrieve filter in edit form

Unread post by Timo »

thanks guys, both suggestions work :D I'll go for Steven's solution
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: How to retrieve filter in edit form

Unread post by admin »

.
Post Reply