- Tue Apr 11, 2017 9:26 pm
#790255
Hello there,
I experimented by writing dynamic sql queries in a Dynaform in the following way:
1. Defined a textbox field 'SearchString' in a Dynaform. This would hold the text content for a sql query.
2. Defined another textbox field 'SearchResult' in the same Dynaform. Defined its sql control as @=SearchString. This is to ensure that the contents of SearchString get transferred to SearchResult, and hopefully fire the sql query of SearchResult.
3. E.g. SearchString could be defined as "select abc from def where xyz = 'ijk' ". This should populate the sql query parameter of SearchResult, fire the sql query content "select abc from def where xyz = 'ijk' ", and provide the corresponding result.
4. By this way, I could change the sql string in SearchString, using Javascript based on selected conditions, to anything else which is valid and see the corresponding result in SearchResult.
Here is what happened:
a) This worked fine in the designer environment of the Dynaform. No issues there.
b) However, the same config did not work in runtime environment. The queries did not fire when logged in as a user.
I am wondering why this happened - worked in designer environment, but did not work in runtime.
Any help would be useful.
Many thanks in advance,
SGK
I experimented by writing dynamic sql queries in a Dynaform in the following way:
1. Defined a textbox field 'SearchString' in a Dynaform. This would hold the text content for a sql query.
2. Defined another textbox field 'SearchResult' in the same Dynaform. Defined its sql control as @=SearchString. This is to ensure that the contents of SearchString get transferred to SearchResult, and hopefully fire the sql query of SearchResult.
3. E.g. SearchString could be defined as "select abc from def where xyz = 'ijk' ". This should populate the sql query parameter of SearchResult, fire the sql query content "select abc from def where xyz = 'ijk' ", and provide the corresponding result.
4. By this way, I could change the sql string in SearchString, using Javascript based on selected conditions, to anything else which is valid and see the corresponding result in SearchResult.
Here is what happened:
a) This worked fine in the designer environment of the Dynaform. No issues there.
b) However, the same config did not work in runtime environment. The queries did not fire when logged in as a user.
I am wondering why this happened - worked in designer environment, but did not work in runtime.
Any help would be useful.
Many thanks in advance,
SGK