A user should input data to a textinput to search for a company. A gallery then searches for the input in a SQL table which is then display with help of a textinput. Depending on the value of an dropdownbox, it decides which table it should search for. The problem arises when I write an if-statement to decided which table it should search for.
When not including an if statement but only searching in one table, it is successful. As you can see below, the user searches for a company, with the help of a gallery and text input the result can be shown. The gallerywalk searches in the table "FTG_Namn" and the textinput shows the data with the help of the variable "This.Item".
However, when adding complexity to it where I want to search in different tables depending on a dropdown, it does not work. So when the dropdownbox (title is "type") is blank, it should search in the table "FTG_NAMN" and if it holds another value it should search in the table "Fieldsofplay". So I wrote an if-statement in both the gallery and the textinput for it to know how it should behave. And also depending on the value on the dropbox, it should also take the value "ThisItem.FTG_NAMN" or "ThisItem.FieldsofPlay".
Does someone have a solution to how you could get the gallery and text input to behave as intended?
Best regards,
Sadde

Report
All responses (
Answers (