Hi All, I am going through the SAIL recipes. I am currently studying the bind()

Hi All, I am going through the SAIL recipes. I am currently studying the bind() function.
The recipe is given on the forum at this link .

forum.appian.com/.../SAIL_Recipes.html

In that recipe, a getter function is used which gets employees from web service. Also a setter function is used, which allows the user to post the updated employee information back to the web service (whenever the variable bounded using bind() function is saved into.)

bind() enables us to achieve this elegantly.

My question is:

Assume I am getting the data from a data source using queryEntity() instead of a web service. For writing back the updated data to the web service we use webservicewrite(), which returns a writer (as is expected from a setter rule) .
Since I am using a database as my source instead of a webservice, How can I write my updated data back to the...

OriginalPostID-130520

OriginalPostID-130520

  Discussion posts and replies are publicly visible

Parents
  • Hi Chetan,
    Yes, there exists a custom plugin function named - executequery - which you can use anywhere across your sail code/expression rules to do any type of database related operations.
    It simply takes the datasource name and the sql query to execute as it's arguments.

    PS: The output if this function is in form if JSON and hence you need to use some JSON extract functions to extract the necessary values from the returned JSON output.
Reply
  • Hi Chetan,
    Yes, there exists a custom plugin function named - executequery - which you can use anywhere across your sail code/expression rules to do any type of database related operations.
    It simply takes the datasource name and the sql query to execute as it's arguments.

    PS: The output if this function is in form if JSON and hence you need to use some JSON extract functions to extract the necessary values from the returned JSON output.
Children
No Data