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
6 replies
Subscribers
5 subscribers
Views
2379 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Hi, I have created a process model which calls a WebService using Cal
vbhardwaj
Certified Senior Developer
over 8 years ago
Hi,
I have created a process model which calls a WebService using Call Webservice Smart Service to fetch the records and then inserts/updates the records in the mySQL database using Write to data store Smart Service. The Webservice returns 1192 records and 115 distinct records are inserted into the database, which is perfectly fine as one of the field in Webservice output schema is a PK in the table. Hence it would insert only distinct values into the table. But the problem is "Stored Values" on output tab of Write to datastore has 1192 records, it should have 115 records which were inserted into the database.
Please suggest, how will I get to know how many records were inserted into the database.
Thanks in advance,
Vikrant.
OriginalPostID-168920
OriginalPostID-168920
Discussion posts and replies are publicly visible
Parents
0
Chris
over 8 years ago
Not sure if this is the most elegant solution - but you could use a query rule to compare the current DB PKs to CDT PKs prior to the Write to DS node. The difference(rule!CDT.PKs,rule!QR_Pks) function would give you the new PKs - which you could use to identify the new rows. Or if the web service returns nulls for the new PKs, just check where in the CDT null values are located prior to the write.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Chris
over 8 years ago
Not sure if this is the most elegant solution - but you could use a query rule to compare the current DB PKs to CDT PKs prior to the Write to DS node. The difference(rule!CDT.PKs,rule!QR_Pks) function would give you the new PKs - which you could use to identify the new rows. Or if the web service returns nulls for the new PKs, just check where in the CDT null values are located prior to the write.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data