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
24 replies
Subscribers
5 subscribers
Views
8577 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
I am facing a problem in writing values to multiple data store. What I am trying
zianf
over 7 years ago
I am facing a problem in writing values to multiple data store. What I am trying to do is :
1)I have created an interface with 2 sections. Section 1 stores data in one CDT(emp1) and Section 2 stores data in another CDT(emp2).
2)I have created the process model and have included the ‘Write to multiple data store’ smart service.
The problem I am facing with this is the value under DATA->Output->Results->Storedvalues->targets, when I set the target variable and click on ‘OK’ and check the same node again, the value vanishes.
I need guidance to solve this issue.
processmodel.docx
OriginalPostID-219388
OriginalPostID-219388
Discussion posts and replies are publicly visible
0
Sidhant Behura
over 7 years ago
What version of Appian are you working on ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
yaswanthreddya
over 7 years ago
@zianf - which type of variable have you used to store that target value ? (i.e Default entitydata datatype provided there for Stored values or other datatype)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Vinod Bongoni
Certified Lead Developer
over 7 years ago
You can save by using StoredValues[1].data, StoredValues[2].data ...etc
forum.appian.com/.../Write_to_Multiple_Data_Store_Entities_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sidhant Behura
over 7 years ago
@yaswanthreddya - As per my knowledge, process variables of any other Type wont appear in the Target. So you have to select a process variable of EntityData. Please correct me if I am wrong.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
yaswanthreddya
over 7 years ago
@sidhantb - yes,but in write to dataStore entity smart service we can give anytype where as in write to multiple dataStore entities we cann't.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rajasekhar Pamidipati
A Score Level 2
over 7 years ago
Hi zianf,
can i know why you are trying to save entity value from storedValues?
actually when ever you want to store output of the executed query then you need to take that from ac!storedValue. in that you can take the what are the entity value and data value.
So in my opinion the configuration which you are doing is not proper. please read the documentation of how to use this smartservice once.
forum.appian.com/.../Write_to_Multiple_Data_Store_Entities_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sowrabha Rajashekar
over 7 years ago
@zianf, you are storing "data" in entity , it should have been like,
{entity: constant pointing to that entity or a pv of type datastore entity,
data:pv!Emp1_basic},
{entity: constant pointing to that entity or a pv of type datastore entity,
data:pv!Emp2_add},and then you can extract only the data via, StoredValues[1].data, StoredValues[2].data,
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jaggu
over 7 years ago
Hi,
Do not save into DATA->Output->Results->Storedvalues->targets, instead save into "Custom Outputs". i.e DATA->Output->Custom Outputs > target.
That time your expression should have "ac!StoredValues[1].data" and target should be your first cdt which passed into entity array. and followed by rest ac!StoredValues[2].data into 2nd cdt and so on.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
zianf
over 7 years ago
Under Data->Inputs->ValuestoStore->Expression Editor i have given
={
{
entity:cons!MD_EMP1,
data:pv!Emp1_basic
},
{
entity:cons!MD_EMP2,
data:pv!Emp2_add
}
}
where cons!MD_EMP1 and cons!MD_EMP2 are constants pointing to their respective entities...Also under
"Custom Outputs". i.e DATA->Output->Custom Outputs > target
Expression:ac!StoredValues[1].data
operator: is stored as
Target: Emp_1 (type: cdt)
Expression:ac!StoredValues[2].data
operator: is stored as
Target: Emp_2 (type: cdt)
my data still doesn't get written into the database
my appian version is 16.1
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sowrabha Rajashekar
over 7 years ago
@zianf, can you please share the error message
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>