Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
8 subscribers
Views
2284 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi All, I am going through the SAIL recipes. I am currently studying the bind()
chetany
A Score Level 1
over 10 years ago
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
0
chetany
A Score Level 1
over 10 years ago
... database?
Is there something parallel to webservicewrite() for writing to database? (I know there exists "Write to Data Source" smart service. But I want to do it through SAIL expression.)
Thanks,
Chetan
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
siddharthg521
over 10 years ago
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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 10 years ago
Hi Siddharth, Thank you for the reply. I will deploy the executequery() plugin and try it out.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 10 years ago
Hi Siddhartha, Can you send me the link for the executequery function plugin? I search in Records->Shared Components->Expression Functions. But could not find the plugin you mentioned. Please send me the link if possible.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
janakik
over 9 years ago
Hi Chetan, Were you able to find the executeQuery component and the execute the SQL queries from SAIL ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel