So, I'm building a record where i have all the items in the store, then i can drill down to 1 item and update ir, but when i click on update item related action i get this error:
An error occurred while applying the context for the AS Items In Store related action [identifier=21]. Details: No process parameter found corresponding to override [name=pv!item]. Non-parameter process variables cannot be overridden.
Any help?
Discussion posts and replies are publicly visible
Sure, this means that you try to pass a value to the variable "item" in the process. This process variable does not exist or is not configured as a parameter.
I'm a little fresh on this part can you elaborate, for instance the problem is in the process model? or in some interface? I dont think I have any variable called item, i only refer to item as the object that has the attribues from the CDT
In the related action, you need to pass some data to the process model. Like in this example
https://docs.appian.com/suite/help/21.3/record-actions.html#configure-a-new-record-action-manually
The fields in the dictionary must match the process variables and the process variables need to be configured as a parameter.
I don't know what i've changed now displays this error:
An error occurred while applying the context for the AS Items In Store related action [identifier=21]. Details: Could not cast from AS_Product?list to Dictionary. Details: CastInvalid
Dictionary is kind of like a structure-less CDT. It's an array of key-value pairs. It seems that we either have the contents from the form as a dictionary going into the CDT in the Process Model, or we have the CDT in the interface being poured into a Process Variable that hasn't been configured to be the type of the CDT. I think the latter is more likely. It sounds like Appian is trying to implicitly cast the CDT as a Dictionary to make it fit.
Create a new Process Variable in the process variables tab, give it the same type as the CDT has in the form, Make sure to click the checkboxes to make it a parameter and make it multiple (based on what the error message says).
Please post screenshots of your record action context and the list of process variables in process model properties.
is this enough? could it be because my imageId is an array of documents?
You need to pass the context as a dictionary. Check the image from the documentation.
In your case this would be
{ product: rule!AS_Get_By_Id(rv!identifier) }
thank you it works, but it's not passing the values through, I get a form without the values from the item i want to update
Check process instance monitoring for the actual values of your process variables. If that is OK, Check the assignment of PVs to rule inputs of the interface.
I dont get any info in the process instances
Switch the status filter to "All Processes"
I get this
https://docs.appian.com/suite/help/21.3/Monitoring_and_Editing_Processes.html
Click the first process. It will load in background.
It displayed blue to the end node through de write to database but in the details doesnt show anything in the write to database node
OK ... is the DB being updated?
Just checked it is
as for the "assignment of PVs to rule inputs of the interface" I have this:
a!localVariables( local!name: null, local!price: null, local!qty: null, local!description: null, local!category: null, local!imageid: {null}, a!formLayout( label: "Add Item to the Store", contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!textField( label: "Item's Name", labelPosition: if( ri!readOnly, "ADJACENT", "ABOVE" ), value: local!name, saveInto: local!name, characterLimit: 255, required: true, readOnly: ri!readOnly ), a!floatingPointField( label: "Price ($)", labelPosition: if( ri!readOnly, "ADJACENT", "ABOVE" ), value: local!price, saveInto: local!price, required: true, readOnly: ri!readOnly ), a!integerField( label: "Quantity", labelPosition: if( ri!readOnly, "ADJACENT", "ABOVE" ), value: local!qty, saveInto: local!qty, required: true, readOnly: ri!readOnly ), a!paragraphField( label: "Description", labelPosition: if( ri!readOnly, "ADJACENT", "ABOVE" ), value: local!description, saveInto: local!description, characterLimit: 1000, readOnly: ri!readOnly ) } ), a!columnLayout( contents: { a!dropdownField( label: "Category", labelPosition: "ABOVE", placeholder: "--- Choose what type of item it is ---", choiceLabels: cons!AS_categories, choiceValues: cons!AS_categories, value: local!category, saveInto: local!category, searchDisplay: "AUTO", required: true, validations: {} ), a!fileUploadField( label: "Add pictures", labelPosition: "ABOVE", target: cons!AS_Documents_Pointer, maxSelections: 5, value: local!imageid, saveInto: local!imageid, required: true ) } ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "validate", saveInto: { a!save(ri!product.owner,loggedInUser()), a!save(ri!product.dateAdded,today()), a!save(ri!product.category,local!category), a!save(ri!product.description,local!description), a!save(ri!product.imageId,local!imageid), a!save(ri!product.name,local!name), a!save(ri!product.price,local!price), a!save(ri!product.quantity,local!qty) }, submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) }, showWhen: or( isnull( ri!readOnly ), not( ri!readOnly ) ) ) ) )
fixed it, thanks for the trouble