Custom Tables queries and form controls

Mateusz Żebrowski asked on April 10, 2015 10:26

In some form controls as radio buttons or dropdown list it is possible to get data from custom table by writing SQL query i.e. Select Column1, Column2 from customtable_MyTable.

From the other hand in custom tables it is possible to write sql query. Is it possible to use this query in form controls?

Recent Answers

Suneel Jhangiani answered on April 10, 2015 13:14

For radio buttons you should be able to specify the SQL Query when configuring the field definition. As for a drop downlist, I would be more tempted to create a custom form control (

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 10, 2015 13:44

There is no reason you can't use a sql query for any of the form controls within any of the objects (forms, custom tables, page types, etc.) That's what they are meant for.

So are you stating that you have a custom table of "widgets" and you want to have a dropdown list form control that is a list of those widgets without the user having to actually write the query? If so, you should be able to clone the existing dropdown list form control and set default property values for it (query and such) and simply rename it. I don't believe this would involve any coding, just configuring.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.