How to "store" selcted items
How to "store" selcted items
Hello,
i have a rather simple form which contains a checked list box (name: licenses) and I want to store the selected values into a variable (Name: abc) upon click on "OK" Button in order to use the selected values in a SQL query.
How do I do that?
i have a rather simple form which contains a checked list box (name: licenses) and I want to store the selected values into a variable (Name: abc) upon click on "OK" Button in order to use the selected values in a SQL query.
How do I do that?
-
- Posts: 6381
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to "store" selcted items
Hello,
The Form is obsolete. You can use the Request From User option for the variable, and then use this variable in the query.
Thank you.
The Form is obsolete. You can use the Request From User option for the variable, and then use this variable in the query.
Thank you.
Re: How to "store" selcted items
Do you have some kind of example for the "Request From User option" or a "how to" so to say?
-
- Posts: 6381
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to "store" selcted items
Hello,
Parameters category on our Demo:
https://demo.stimulsoft.com/#Net/Parame ... Categories
Thank you.
Parameters category on our Demo:
https://demo.stimulsoft.com/#Net/Parame ... Categories
Thank you.
Re: How to "store" selcted items
Ok, understood.
If i want to use the selected Values as paramter in my query it says "Cannot convert StringList to string"
Can it be worked around with an expression for example?
If i want to use the selected Values as paramter in my query it says "Cannot convert StringList to string"
Can it be worked around with an expression for example?
-
- Posts: 6381
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to "store" selcted items
Hello,
In this case, you should use the ToQueryString() for the list variable.
Thank you.
In this case, you should use the ToQueryString() for the list variable.
Thank you.
- Attachments
-
- ListInQueryString.mrt
- (7.62 KiB) Downloaded 91 times
Re: How to "store" selcted items
If I use your example in my SQL-Query (of course with correct var-reference) results in Parse error: Syntax error
Concerning bit of SQL-Query: AND L.SkuPartNumber IN {(us_lic.Count == 0 ? "('')" : "(" + us_lic.ToQueryString("'") + ")")}
Concerning bit of SQL-Query: AND L.SkuPartNumber IN {(us_lic.Count == 0 ? "('')" : "(" + us_lic.ToQueryString("'") + ")")}
-
- Posts: 6381
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to "store" selcted items
Hello,
If the SkuPartNumber is numeric, please try to check:
IN {(us_lic.Count == 0 ? "(0)" : "(" + us_lic.ToQueryString() + ")")}
Thank you.
If the SkuPartNumber is numeric, please try to check:
IN {(us_lic.Count == 0 ? "(0)" : "(" + us_lic.ToQueryString() + ")")}
Thank you.
Re: How to "store" selcted items
Nope, it's a string
-
- Posts: 6381
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to "store" selcted items
Hello,
Please send us a sample report with test data for analysis.
Thank you.
Please send us a sample report with test data for analysis.
Thank you.