Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Can't get #clone# hash variable

Post Reply
crush
Posts: 14
Joined: Tue Apr 02, 2013 8:49 pm

Can't get #clone# hash variable

Unread post by crush »

Hi,

I have a subform on a form, and in that subform I have the following display condition for the add button:

Code: Select all

SELECT ('#recordID#' != '-1' AND '#clone#' != '1')
The #recordID# hash variable, as well as form hash variables, are converted fine. But #clone# remains '#clone#' instead of the value of #clone#.

This seems strange to me, since according to http://wiki.nubuilder.com/tiki-index.ph ... structure= the #clone# hash variable should be available in all display conditions.

Any explanation?

Thanks,
Cassidy
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Can't get #clone# hash variable

Unread post by massiws »

Cassidy, try to write your code this way:

Code: Select all

SELECT IF('#recordID#' != '-1' AND '#clone#' != '1', 1, 0)
Max
crush
Posts: 14
Joined: Tue Apr 02, 2013 8:49 pm

Re: Can't get #clone# hash variable

Unread post by crush »

Hi Max,

Thank you for your reply.

I used the syntax you suggested, but that doesn't change the fact that #clone# remains '#clone#' in the display condition, instead of the value of document.getElementById('clone').value: '1' if the record is a clone or '' if it isn't.

Cassidy
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Can't get #clone# hash variable

Unread post by massiws »

crush,
sorry, but I can't replicate your problem.
Maybe there is something wrong in your logic: do you remember that Add button is displayed only on Browse Screen and Clone button is displayed only on Edit Screen?
Post Reply