Page 1 of 1
Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 3:41 pm
by alexamores
Our version is 4.6.4 and I don't know if we have the security enhanced mode. How do I know if we have it?
But here is my question. Why can't I see the "choices parameter value" property?
Thank you,
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 3:52 pm
by Alex
When you select a widget with choices, such as a dropdown, and the enhanced security mode is turned on, you should see the "choices parameter value" property there. If the enhanced security mode is not turned on, you will not see this property.
That would be one way to tell if enhanced security mode is turned on. The other way would be to check in your HTTP configuration file.
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 4:13 pm
by David
The enhanced security mode is the default starting with version 4.5.0. In the version you are using, you have to explicitly turn it off by adding an environment variable to your HTTP configuration file. As documented here:
http://www.profoundlogic.com/docs/displ ... urity+Mode
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 4:15 pm
by David
Not that I would recommend to turn it off -- what I meant to say, really, was that the environment variable mentioned in the document is the only way to turn it off in the version you are using. So if that's not in there, then you are using the recommended enhanced mode.
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 4:21 pm
by alexamores
I did see on the configuration file that the enhanced security mode is disabled. So even though we have the latest version, we can still use script on "choices selection criteria" property to get a dynamic selection drop down values? Example:
script: "DIVCOMPANY = " + get("company");
where:
DIVCOMPANY = field name in the database file
get = js command
company = widget id name where the selected record will be based on.
Assumption:
The first selection widget will contain the company number and the name is "company".
The second selection widget will contain selection of division name within that company number only.
What is else is missing on this set-up in order to make it to work?
Thank you,
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 4:29 pm
by Alex
Is the company widget rendered before the division selection widget? In the Elements tab, the company widget should be listed before the division widget. Otherwise, the get() API might not find the company because it hasn't rendered yet.
Re: Database-Driven Selection Properties
Posted: Fri Jan 03, 2014 5:22 pm
by alexamores
Hi Alex,
Yes it is on the correct order. I added an event to 'applyProperty' onchange on the company widget. I saw this on the forum. But still I can't make it work.
Both of them are textbox widget. But when I forced a value on the division widget's "choices selection criteria" js, it return values. This tells me that either the get command is not getting the correct value or there is an sql error.
Thank you.