I am trying to fetch from a SQL Database users details based on the unique identifier.
For that I want to use a SQL Request with a WHERE condition to return information corresponding to a given user:
The query run in "Run Now" if I manually input and replace the ID. But when the form load and that the Item Property ID should be set up in the SELECT statement then it doesn't.
I tried different syntax without success and I am now wondering if it is possible to use a Item Property inside the SQL Query ?
Does someone has any working experience of such case ?
Thank in advance,
Solved! Go to Solution.
This was indeed the problem, the documentation is absolutely not clear concerning this component..
Apparently the Value Field & Display Field refer to the SQL table's column name returned by the query.
(In the case that the SELECT command return two fields that would be a value and its name associated ..)
Not only these name would make sense only in a few scenarios but in addition this can work only if we are using the component as a Lookup where there is an association of Name - Value. Otherwise it seems that the value is lost if we set it up as a label.
I think it would be worth to update the SQL Request control component description, at least to indicate that these field should be the name of the SQL table column name returned by the Stored Procedure or Query.
Thanks for your help anyway