I have ProjectTeam CDT for this i have created editable grid to submit list of records
1.Interface configuration
2.Procees start form configuration
3.variable configuration
4.debugging form submitting two records in editable grid
5.Process history
6.after completing process only one record saving one record is null as shown in screeshot
7.ProjectTeam CDT
addRowlink: a!dynamicLink( label: "Add Employee", /* * For your use case, set the value to a blank instance of your CDT using * the type constructor, e.g. type!Employee(). Only specify the field * if you want to give it a default value e.g. startDate: today()+1. */ value: { 'type!{urn:com:appian:types:DSR}DSR_ProjectTeam'() } , saveInto: { a!save( local!projectteam, append(local!projectteam, save!value)), a!save(ri!DSR_ProjectTeam, append(local!projectteam, save!value)) } ),
any suggestions on this Please let me know any changes required
Thanks
Discussion posts and replies are publicly visible
The configuration of the write to DSE does not seem to be correct.
https://docs.appian.com/suite/help/20.3/Write_to_Multiple_Data_Store_Entities_Smart_Service.html#example-inputs
Also check docs for how to store written data from db back to PVs.
Im able to store multiple values in ProjectTeaam but Projectid updating only first record remaining records unable to map
OK. What are the inputs Param4 and Param6 for? "Value to Store" looks OK. What about the outputs? How do you store the values written to DB back to PVs?
Check https://docs.appian.com/suite/help/20.3/Process_Node_and_Smart_Service_Properties.html#node-inputs
Your Param4 config means: Take that value and copy it input the node on activation, when complete, take this node value and store it back to the PV. This might end up in a race condition.
I agree with everything Stefan is saying so far; honestly, I'd go one step further for simplicity's sake (since you're only trying to write to 2 separate DSEs) and abandon the Write to Multiple DSE approach and just string together two separate single Write to DSE nodes. These are much easier to understand when it comes to writing the autogenerated values (i.e. primary key IDs) back to the process PV, and it's a lot easier to troubleshoot.
Hi Mike
As per your instructions i created seperate cdts and still im unable to map projectid all the records
Mike can you help me out since im fresher to appian im fail configure .Please look at screenshots
Let me know if changes required
Please check the documentation I suggested. To store the values written to DB you need to remove the saveInto from the input tabs, go to outputs and save "storedValues" to your PVs.
To store the values written to DB i remove from the saveInto from the input tabs,and outputs save "storedValues" mapped to PVs.
still im getting same
Both of these are configured slightly incorrectly. On the Inputs tab (as Stefan mentioned earlier) you need to make sure the CDTs aren't saving back into the PV, and instead, do that in the Outputs tab.
Mike I agreed and same configuration I did as per your suggestion I'm able to get data back to Pvs
But my concern is I'm submitting 2 records iusing editable grid as you can see in screenshot of interface .in this case 1st record is able to store projectid as you can see in variable screenshot and 2nd record projectid is null
Projcetid is primary key in DSR_Project
Projcetid is foreign key in DSR_Milestone
Technically you try to assign a single value to a list. The result is that the list only has one value ...
We prefer to create an expression rule for these kinds of "complex" data manipulations. First rule input is your list of milestones, second one is the id of the project. Now you use the plugin updateDictionary to assign the id to the milestones in a foreach. Use this expression in a script task.
The other option is to do that in process using MNI (Multiple Node Execution) but it is agreed consent to prefer an expression.
a!localVariables( local!a: { {projectteamid:220, projectid:196, roleid:3, employeeid:1, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"}, {projectteamid:221, projectid: 4 , roleid:7, employeeid:2, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"} }, local!b:70, )
Stefen Helze,
from above code can you send me solution using updateDictionary to update local!b value to the local!a dictionary .
Thanks in advance
a!localVariables( local!a: { {projectteamid:220, projectid:196, roleid:3, employeeid:1, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"}, {projectteamid:221, projectid: 4 , roleid:7, employeeid:2, startdate:"10/17/2020", enddate:"10/17/2020", description:"ASD"} }, local!b:70, a!forEach( items: local!a, expression: updatedictionary( fv!item, {projectid: local!b} ) ) )