I'm looking for a fuction to replace the following psuedocode:
Exists(Textbox1.Text;
DropDown.Items)
//Returns true if textbox1.text is in the list of dropdown items.
EDIT: Made an edit to make the problem easier to explain.
@WarrenBelz I was just very unclear. What I could do is turn the list of countries into a collection and use the Filter + Count methods on it to determine if it's in the list. But was hoping I could use another control (and its items property where I have all the values it could have defined) as the source of the list to check against instead, if that makes sense.
I couldn't use dropdown.items as a datasource, so I suspect it's not possible to do.
Thanks for your help!
Hi @agneum ,
I also should have seen your level and realised you would have thought of the solution I posted.
I think you are on the right track.
If the idea is to limit calls to your database, create a collection and then use the collection as the dropdown list :
ClearCollect( Countries, { City: "London", Country: "United Kingdom"}, { City: "Berlin", Country: "Germany"}, { City: "Madrid", Country: "Spain"}, { City: "Hamburg", Country: "Germany"}, { City: "Barcelona", Country: "Spain"}, { City: "Munich", Country: "Germany"})
OR
ClearCollect (Countries,YourTableName) The use Countries as a list for the dropdown
Adding screen shot may help clarify issues.
Seems like a collection is the way to go. But since the dropdown is a lookup on a static table, it would be nice to somehow specify "this is the list of values this dropdown can be" directly in the property.
User | Count |
---|---|
251 | |
249 | |
82 | |
45 | |
27 |
User | Count |
---|---|
350 | |
265 | |
127 | |
60 | |
58 |