Dynamic list

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Dynamic list

#1

Postby Segi » Wed Sep 21, 2016 10:33 pm

I have 2 dynamic lists tied to a dropdown:

Permission Sections and Permissions. Both fields have "When list is built" to "Each display"

When you select a permission section, the permission dropdown list is built using fields.ASSIGNMENTS_PERMISSION.list.buildList();

I'm having an issue where if you select "Please select" from the Permissions dropdown, Ebase crashes with the error "Unable to build dynamic list Permissions for field ASSIGNMENTS_PERMISSION : a list field with the Dynamic Sql option has no value" Is there a way to have it not attempt to built the list if "Please select" is selected.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Sep 22, 2016 8:14 am

If you click the required checkbox, the system will not attempt to build the list when the required where clause field has no value (Please Select). So you shouldn't see this message.

Do you actually need the Dynamic Sql option ? If you are just supplying a value for a where clause parameter you can just click the required checkbox. Dynamic Sql gives you protection against SQL injection, but if the user can't enter the value in question, it isn't needed.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Thu Sep 22, 2016 11:13 pm

Jon,

The DL is defined as:

Code: Select all

SELECT * FROM Permissions Where PermissionSectionID=&&WHERECLAUSE ORDER BY PermissionName
I selected Required for the WHERECLAUSE list field and unchecked dynamic SQL but I still have the same crash when selecting Please select for the dropdown that this DL is tied to

Update: Sorry I don't know why this double posted. I changed "When list is built" from Each display to First display and now it works as expected
Last edited by Segi on Thu Sep 22, 2016 11:27 pm, edited 1 time in total.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#4

Postby Segi » Thu Sep 22, 2016 11:15 pm

Jon,

The DL is defined as:

Code: Select all

SELECT * FROM Permissions Where PermissionSectionID=&&WHERECLAUSE ORDER BY PermissionName
I selected Required for the WHERECLAUSE list field and unchecked dynamic SQL but I still have the same crash when selecting Please select for the dropdown that this DL is tied to
0 x


Who is online

Users browsing this forum: No registered users and 30 guests