Welcome to the nuBuilder Forums!

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

RECORD_ID Problems

Questions related to using nuBuilder Forte.
Post Reply
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 2 times
Been thanked: 1 time

RECORD_ID Problems

Unread post by vario »

I am having problems with hash cookie RECORD_ID.
As in a previous post, for SQL in Display object I must enclose it in double quotes (why?), and now when I reference it in a PHP procedure it has the value of the procedure name.
I am calling the procedure from an Action Button defined in the form Javascript as:

Code: Select all

nuAddActionButton('AddContract', 'Add Contract', 'nuRunPHPHidden("php_add_tcr")');
I inserted the following at the top of the procedure and commented out the rest of the code:

Code: Select all

$js = "nuMessage('Record ID is #RECORD_ID#')";
nuJavascriptCallback($js);
The message displayed on the form is "Record ID is php_add_tcr". What is causing this?
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: RECORD_ID Problems

Unread post by kev1n »

As in a previous post, for SQL in Display object I must enclose it in double quotes (why?), and now when I reference it in a PHP procedure it has the value of the procedure name.
I'll have to check the sources.
The message displayed on the form is "Record ID is php_add_tcr". What is causing this?
Use #record_id# (lower case) instead. (It's a bit confusing to be honest...)

BTW: To see all Hash Cookies, you can run nuHash()

Code: Select all

nuDebug(nuHash());
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 2 times
Been thanked: 1 time

Re: RECORD_ID Problems

Unread post by vario »

Lower case is good! Should I go with lower case for all hash cookies? BTW, #RECORD_ID# does work in other procedures!
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: RECORD_ID Problems

Unread post by kev1n »

vario wrote: BTW, #RECORD_ID# does work in other procedures!
When running them with nuRunPHPHidden() ?

If I'm not mistaken, #RECORD_ID# can be used in PHP BS, AS etc. events and #record_id# when using nuRunPHPHidden()
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 2 times
Been thanked: 1 time

Re: RECORD_ID Problems

Unread post by vario »

OK thanks, I'll get used to forte soon! I think the double quotes issue may have been browser caching or some such because now working with single quotes.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: RECORD_ID Problems

Unread post by kev1n »

Great - thanks for letting us know.
Post Reply