Page 1 of 1

Can't get #clone# hash variable

Posted: Sun Nov 24, 2013 2:42 am
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

Re: Can't get #clone# hash variable

Posted: Sun Nov 24, 2013 6:38 pm
by massiws
Cassidy, try to write your code this way:

Code: Select all

SELECT IF('#recordID#' != '-1' AND '#clone#' != '1', 1, 0)
Max

Re: Can't get #clone# hash variable

Posted: Sun Nov 24, 2013 10:22 pm
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

Re: Can't get #clone# hash variable

Posted: Mon Nov 25, 2013 9:12 pm
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?