Page 1 of 1

Global Hash Cookies

Posted: Fri Dec 03, 2021 11:04 pm
by Whoopsadaisy
This is my second day with nuBuilder.
So might be that I do not understand the concept of Global Hash Cookies.
I'm just trying to pass a value from one to another.
Therefore I put in the CustomeCode of form A the code:

Code: Select all

nuSetProperty('SIM_KEY', 'abc', true);
Also I add Run Object to open a second form B.
There I place in the CustomCode of Browse

Code: Select all

console.log("browse: " + nuGetProperty('SIM_KEY'));
and for Edit:

Code: Select all

console.log("edit: " + nuGetProperty('SIM_KEY'));
If the Run object in Form A is configured as Target 'New Breadcrumb',
I get browse: undefined on Browse and Edit Form.

If the Run object in Form A is configured as Target 'Current Breadcrumb',
I get "browse: abc" and when I click on a record to edit: "edit: undefined"

Btw. I get the same result when using nuSetProperty('SIM_KEY', 'abc'); in Form A.

I know that I can use sessionStorage for this, but from all explanation I've read
so far a Global Hash Cookie should achieve the same.

Where am I wrong?

Re: Global Hash Cookies

Posted: Sat Dec 04, 2021 6:30 am
by kev1n
Hi,

Global Hash Cookies can currently be retrieved with nuGetProperty() and they can only be accessed server side and used in PHP, SQL.
You either have to resort to sessionStorage or write a PHP Procedure that retrieve global Hash Cookies and make them available in JavaScript.

Re: Global Hash Cookies

Posted: Sat Dec 04, 2021 2:18 pm
by kev1n
Update: The latest Github commit allows you to retrieve global Hash Cookies with nuGetProperty()