Hello everyone!
So when I create a new product It has the value "New" as default in the Status field.
After that it goes throw a Approval Task where the Supervisor has to decide if it is ACCEPTED or REJECTED.
Then it should update the Status field Changing its value from "New" to "Accepted" or "Rejected".
Instead of that it duplicates the item: the old item stays with the value "New" and the new item has the value "Accepted" or "Rejected".
How can i fix that?
Is it wrong to use the a!save as i show in the image? Should I be using a!update? I tried but i don't know how to use it propperly, I thought that maybe it is not right to use a!update.
Or is it wrong configurated in the Data Tab in the Task Configuration:
Or is it somehing wrong in the Data Tab in the Write to Data base Configuration:
I am new to Appian and I've been struggling with this for many hours.
Thank you so much!
Discussion posts and replies are publicly visible
The problem here is most likely that you lose the id of the record somewhere in the interface/process.
That is the reason why a new row appears; a new id is assigned to the updated version of the already existing record upon saving to database.
Therefore I suggest check each step the data flows through in order to see where exactly the id of the item is lost.
My guess: it is the first write to DB node at which the variable is not mapped as data output result. If so, the initially written ID is not returned in the process variable.
That makes sense, because when I create a new Item, it generetes an ID, I can see it in the record as shown in the first image, and also in the summary, as I show here:
So the summary interface works.But then in the Approval Interface there must be some kind of mistake, because when I open the task to Aproove it, it doesn't show the ID:I understand what you say, but i can't find the mistake, this is the process detail of this second test made:
So I guess I need to assign a value to the ID in the approval fase, and it has to be the ID of the item to be approved, but how can I do that?
Your elaboration indeed fits my description. Can you share a screenshot of the Data Outputs tab of the first Write to DB node in your process?
We need to have the process variable registered as the result target.
Here you go!
The highlighted output needs to save back into the in-process CDT PV.
Now set the correct process variable (the one that is missing its ID now) as target value.
Upon the next instance of the process model, your problem should be solved.
you mean like this Mike? Sorry I've never done this before, I'm not sure of what I'm doing here
Choose the same value as set in the input parameter value
But in the target value for Results Propoerties in Outputs, i can't choose =pv!record as a target, since as you can see in my last screenshot, I can only select a target from the dropdown list. I've selected Taget: record from that dropdown list, and nothing changed.
This is a screenshot from my first Write to Data Story, where the item is added.
Your screenshot is of the Inputs tab. You actually need to configure the value to be saved via the Outputs tab (like you were about to have in your own prior screenshot).
Chamej said:in the target value for Results Propoerties in Outputs, i can't choose =pv!record as a target
Can you clarify what you mean by this? I can see it as a dropdown selection in your pior screenshot. You just need to select it(??)
Right! So i did select in Output' tab record as target and still doens't work:
I'm sending more screenshots to you about the rest of the input/output config for my Task Event and my Update to Data Base:
Thank you sooo much for your time, I really appreciate it
Do you think the problem might be in my approval interface? Since the only value that it's not getting is the ID:
Maybe I need to fix the ID fields (highlited in the next screenshot)?
Because checking the tutorial, eventhough they are using a reusable interface and I'm not, they use a get by ID rule)