How do I append to a multi line text field

  • 6 August 2017
  • 9 replies
  • 24 views

Badge +9

I have a list workflow where I have a column called "column change"

I have a 3 separate workflows that have conditional workflows on modify

WF1- If Column called First Name  changes then update column called "column change" to "First Name"

WF2- If Column called Last Name  changes then update column called "column change" to "First Name;Last Name" assuming First Name also changed

WF3- If Column called Fitness Test  changes then update column called "column change" to "First Name;Last Name,Fitness Test" assuming First Name and Last Name also changed

However, when I attempt to run the 3 workflows only 1 value will display even in cases where all 3 columns have changed.  

Workflows

At the Start of WF 1 I clear the column called "column change" and then set the value to "First Name"

At the start of the WF 2 I save the existing value value found in  the column called "column change" to a variable.  In the Set Value I indicate to update the field to the variable and Last Name varCol Change & " " & "Last Name"

At the start of the WF 3 I save the existing value value found in  the column called "column change" to a variable.  In the Set Value I indicate to update the field to the variable and Last Name varCol Change & " " & "Fitness Test"

How do I achieve the column called "column change" to reflect all column names (First, Last, and Fitness Test) if all columns actually have changed...Note the conditional WF works in that the comparsion of previous vs current detects if a column has changed, I just cant figure out how to update the "column change" column to reflect what essentially the conditional workflow found.

Desired Results

End Result if all 3 columns change

Column Change should display

First Name;Last Name;Fitness Test (note not the value of the column, but just the column name should display in this column)

End Result if all 2 columns change

Column Change should display

First Name;Last Name (note not the value of the column, but just the column name should display in this column)

OR

First Name;Fitness Test (note not the value of the column, but just the column name should display in this column)

OR

Last Name Name;Fitness Test (note not the value of the column, but just the column name should display in this column)

End Result if 1 column change

Column Change should display

First Name (note not the value of the column, but just the column name should display in this column)

OR

Last Name (note not the value of the column, but just the column name should display in this column)

OR

Fitness Test (note not the value of the column, but just the column name should display in this column)


9 replies

Userlevel 5
Badge +14

what's the purpose or later use of info saved in 'column changed' field?

if it's just kind of auditing,  wouldn't it be sufficient to to use multiline text field with 'append changes to existing text' configured?

when you write, if last name changes I assume first name changes as well, I assume that both really have been changed. that means both wf1 and wf2 are started.

then problem with your setup is that all your  workflows starts with the same value (empty?) of 'column change' field. hence which workflow make its update last that value you see saved. to achieve what you need you should handle all the changes withing one workflow and with run-if conditions determine whether particular field was updated or not and so whether it needs a record in 'column change' field.

Badge +9

My situation is this:

I have a list that requires approval on Change.  A WF is sent out to the approver on any change done to the list.  When I send the workflow to the approver requesting approval they have no idea what changed !  Thus I was hoping to leverage the Conditional WF start to figure out what column got changed and update the column called "Changed Column" to indicate what column was changed.  I thought I would need to create 3 Workflows and Conditionally start the Workflow.  I don't believe I can do 1 Workflow because how would I know WHICH column was changed, all I would know is a column got changed...

Suggestions.

Userlevel 5
Badge +14

ok, I see.

what about then to create start conditions like

wf1: FirstName <> PrevFirstName && LastName == PrevLastName && Fitness == PrevFitness

wf2: FirstName <> PrevFirstName && LastName <> PrevLastName && Fitness == PrevFitness

wf3: FirstName <> PrevFirstName && LastName <> PrevLastName && Fitness <> PrevFitness

so you'll make sure only one workflow is started at a time based on what columns have changed so they will not overwrite by each other.

Badge +9

That makes sense.  Unfortunately I have 10 columns to check.  I just used 3 columns as an example.  I did think about creating 10 hidden yes/no columns and if the column changed I would check off the column.  The problem is I would need to create 10 conditional workflows which I assume would start at the same time and may fall over each other..

I really hope there is some way I can communicate to the approver what column changed that does not become too complicated.

Badge +9

Perhaps I should maintain a copy of the list from the prior night ?  I would hate have it become this complicated, but I dont know what else to do ?

Userlevel 5
Badge +14

all the complexity comes from the fact that only reliable and easy to use approach to detect a change on a given field is to start a workflow with condition that examines that specific field.
even with that you'll only detect that a change happened but not what exactly has changed (old and new value).

you can save some flags from form, but that need not be reliable.
at first it will not notice changes made out of the form (eg. direct change in list view or change made by a workflow).
at second to detect real value change (not just control change event) need not be trivial since some controls do postbacks and form may reload and you would need to store original value in a way that persists across reloads.

you can save copy of a list.
BUT, depends on size of your list it might bring some performance concerns.
and mainly, it need not be reliable either - you will compare just against saved version. so if two changes like A->B->A happen you will not notice the second change and so will not get it approved.

there is as well possibility to examine item version history, if it is enabled.  that would, however, need to use web service call to get item's version history trail and process (quite) huge XML. however, to determine latest change you will need to compare two subsequent changes on your own.
need not be easy as well.


I'm sorry, but I do not see any good and easy solution with capabilities that nintex/sharepoint currently provide.

Badge +9

Actually we came up with a simple solution.  We turned on versioning. Thus once the manager gets an email that a change has been made to the List and requesting approval they can check versioning history and cleary see old/new... Wish I had seen this before... 

Userlevel 5
Badge +14

yeah, great!

sometimes little user's effort saves a lot of developer's work happy.png

Userlevel 5
Badge +13

Are you using Nintex Forms for this particular venture? If so, are you On-Prem or 365? Last I checked (which has been a bit!) the "append changes to existing text" with the "versioning" didn't work with O365 forms ( as seen here: Append Changes to Existing Text ) and here's how I got around it: https://community.nintex.com/thread/15147-extract-last-update-from-versioned-multi-line-text-field#comment-57906  

Reply