I have built a workflow that is fundamentally an approval for overtime hours. The list is driven by a Nintex form that contains a repeating section to capture the various entries for a period of a month. That all works well, but I have a problem with capturing the history into the same list. This is because our payroll teams need visibility of an audit trail.
To achieve this, at regular points in the process, I have actions that initially retrieve history for that item, from the list column (I called it GenFormHist), which is then added to a multi-line variable varHistory. During the course of the workflow, I read, append and update that column through the same actions, also logging to the Nintex history list as well (which I believe is volatile - max 90 days?)
What seems to be happening, is that the initial history entry, when the form is first submitted in a status of New, I simply write a "New item" entry to the history column, then store that into the varHistory variable. The next actions include a condition, to see if the form has a confirmation checkbox set. If not, the form is set to a status of Draft. If true, then the status is changed to Pending.
In the draft scenario, having passed the condition and been routed through the "no" outcome, there is another set of history column read, append and write actions to record that the form has been saved as draft. On that outcome leg, the workflow then ends.
My problem seems to be that the initial entry, the New Item entry, gets lost and does not show in the overall history. Is there something that passing through a condition switch does to the variable values? Do they get blanked or is this down to my poor workflow design - be honest!
Here are the actions concerned:
This is what is added in the initial history item creation:
Here is the configuration of the Query List action:
Finally, the Update item action:
Any help, most welcome.
Solved! Go to Solution.
What does the second varHistory variable update look like (as in the contents of the Set Variable action for instances beyond the first one that is set when GenFormStatus === "New")?
There doesn't really appear to be anything wrong with your procedure, or at least what I see of it.
all seem like standard straight forward and correct things. Without taking a look at the workflow in question, it is difficult to tell where the problem lay. I would recommend doing a mockup test workflow that follows the general flow but just updates a variable and the column in question with arbitrary data to see if you can't sort out what's going on. If your mockup works then at least you know that something else isn't broken and perhaps it's just an oversite in either how something is being set or an unexpected branch being taken in the workflow.
Thanks @mega I basically did what you suggested and stripped everything out, then added them back in. It worked from that point. I can only assume that I got a value slightly wrong or the action itself was damaged in some way. I have seen evidence of that before. Many thanks.