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
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} ) ) )