Ideascripting. Pass comma separated values to a SQL Query
idemnos
Forums
Sometime ago I asked on how could I use an IDEA table as the argument for a SQL QUERY, cause We use to import via ODBC, using a sQL Query like:
Select * from A, B where A.ID=B.ID and A.prod_num in ('10','20','30') and B.date between '20180101' and '20180131'
Using the example you gave me sometime ago I use an Idea form where I can input date1 and date2. In this moment I just have to query by prod_nubmer but what if I need to pass at least 5 prod_nums? Can I use a textbox to input more than one of them?
Thanks in advance
Unfortunately IDEAScript
Unfortunately IDEAScript doesn't have a split command like other languages so you have to do it on yourself. Here is an example of a simple dialog where you would enter values separated by a comma in a text box. The code then reads through what was entered and it separates each item and places it into an array that you can then use to build your SQL or anything else. Below is the code and I have attached the script.