On submit button, I have ri!upload saved with two value [1]- docno:123,ticketNo:444 & [2]- docno:124,ticketNo:3334
when running process model getting above error? if more input details need to clarify my query please let me know.
Discussion posts and replies are publicly visible
Can you show the expression for your interface? Usually I've seen a similar error to this if you're trying to save into a specific index using square brackets. Also what troubleshooting steps have you tried? Usually I remove a little at a time until it fixes the error - then it's a lot easier to solve the problem if you know what caused it.
1. Inside Button- SaveInto: a!forEach( items: local!multidocuploadids, <-- {123,253} expression: a!save(ri!upload[fv!index].docno, fv!item) -->[1]docno:123,ticket:22
-->[2]docno:253,ticket:22 )
2. Troubleshoot [i] if(isnull(local!multidocuploadids),{}, above point1 expression) , Trobleshoot[ii] Removed null column named "id"
Are you certain that at this point there are already at least two items in ri!upload? Personally I don't usually create a dynamic number of saves - I try to only perform a single save that updates all the data. Also I strongly distrust square brackets (because if the index doesn't exist it fails), so I usually look for an alternative that doesn't use them.
If I were doing this I would start with something like this:
saveInto: a!save( target: ri!upload, value: a!forEach( items: ri!upload, expression: a!map( id: fv!item.id, name: fv!item.name, docno: index( local!multidocuploadids, fv!index, null ) ) ) )
Note: I'm not certain if the "items" parameter should be the rule input or the local variable - I can't tell without knowing more context about your interface. Also I used a map for the fields in your rule input, but if it is an explicit type you can use that instead.
Peter Lewis said:at least two items in ri!upload
This does seem like the most likely issue.
Its great Help, its resolved the error.
One small issue,
saveInto: a!save( target: ri!upload, <-- This variable not showing any value(to store in DB) in Process model when i ran Interface using Process Model
##)
I think we need more information - is it working correctly in the interface? How do you have your process variables set up? Is the node executing correctly otherwise? What troubleshooting steps have you tried?
Just a general guideline: the more information you provide here the faster we can help you troubleshoot the issue.
In interface its working fine, as you provided map solution. I was trying the same way as other ri! are stored to DB. The troubleshooting steps that i follow is -
similarly, ticketNumber savedInto PTS_upload.ticketNumber
If you aren't seeing the data saved as a process variable, the issue is likely with your User Input Task and not with the Write to Data Store Entity. Do you have your activity class parameter saved into a process variable in the User Input Task?
Can you also provide a screenshot of your configuration of the Forms tab, just for our verification?