MrCapion
Nintex Newbie

send notification if a particular selected item is changed.

scene:

2 lists.

List 1 is a document library.

List 2 is a list where users can choose to be alerted if one or more documents are changed in List 1.

List 2 has a lookup field, pulling the names of the List 1s documents. The user can select multiple documents.

 

If a document in List 1 is changed, and a user has it selected, the user should get a mail / alert / notification about the change.

in a workflow, attached to List 1, I make a Query.

It pulls List 2, only if the user selection is not empty.

it reads 2 fields: 

"The-Choices" which is stored in a collection variable: "Str-Choices".

and "The User" which is stored in a collection variable: "Str-Users"

 

and from here my trouble starts.

I have tried to split the Choices and users to form two variable "lists" containing each of the choices and users, as "The-Choices" in the Query contains, example: doc1.docx; picturename.jpg;calculation.xlsx  ( separated by ; )

when I make a regular expression for "The-Choices":

pattern:  ; ( a semicolon with no other chars around it )

input text: {workflowvariable:Str-Choices}

store in: EveryChoice (which is a collection variable )

 

and do the "same" with the users:

Pattern: ; ( a semicolon with no other chars around it )

input text: {workflowvariable:Str-Users}

store in: Everyuser (which is a collection variable )

 

the "send notification" mail is configured like this
TO: EveryUser

subject ( standard text about a change )

Body:

Changes made to: EveryChoice

( and some other smart infos to where and when, which works fine)

 

When changes are made, the notification mail arrives with

ALL the EveryChoice in the mail-line "Changes made to: EveryChoice"
like this: doc1.docx; picturename.jpg;calculation.xlsx

 

How do I make it send about ONLY the actually changed choices?

 

( I have not testet with multiple users, but I recon it is the same problem.. EveryUser will get a mail about EveryChoice..  😞  )

 

DO ask if there is something in the above hard to understand... I am Danish 🙂

0 Kudos
Reply
6 Replies
efarley
Nintex Newbie

Re: send notification if a particular selected item is changed.

@MrCapion 

I assume you are running the workflow for each document modified in your library, since you are using a list workflow.  Since you are dealing with a single item, I think a For Each action is more effective.  Try something like this:

efarley_0-1615906175415.png

 

efarley_1-1615906175420.png

 

 This results in a single email notification to all users tracking the file:

efarley_2-1615906175428.png

 

efarley_3-1615906175431.png

 

efarley_4-1615906175435.png

 

See attachment for action configurations

0 Kudos
Reply
MrCapion
Nintex Newbie

Re: send notification if a particular selected item is changed.

I assume that:

id_currID and
pg_AllUsers

are two variables ( not collection type ) ?

0 Kudos
Reply
efarley
Nintex Newbie

Re: send notification if a particular selected item is changed.

Yes, id_CurrUser and pg_AllUsers are variables.  id_CurrUser has an ID data type and pg_AllUsers has a person/group data type.

The id_CurrUser is set in the "Set str_CurrID to id_CurrID" Set Variable action (refer to the ConfigurationDetails attachment on my original post).

efarley_0-1616153993249.png

 

0 Kudos
Reply
MrCapion
Nintex Newbie

Re: send notification if a particular selected item is changed.

I have a strange problem.

I can not set the condition

if any value equals value

where workflow data str_Currid

 

>>> IS EMPTY

 

I only get these options:

Equal to

or

Different from

 

Did You ever see that problem?

0 Kudos
Reply
MrCapion
Nintex Newbie

Re: send notification if a particular selected item is changed.

i did a workaround on the "is empty" missing option:
leave it as a standard value field, then choose via "insert reference" > str_CurrID

now moving on to try to get it to work.
0 Kudos
Reply
MrCapion
Nintex Newbie

Re: send notification if a particular selected item is changed.

It is only sending notification to 1 user, not all.

 

this is what I have:


wait ( pause ) 1 minute. ( I have another workflow copying name to titel, and have to wait for it )

Query list:
Select only items when following is True:
List: UserSelections
Sort: TestLibrary-Choises ( a lookup field ) Contains: Titel

Field: ID saved in: TrackedFilesID ( collection type variable )


>>>>

For each:
Target: TrackedFilesID
save in: Str_CurrID ( Id type )
Index: Indexed ( numbers type )

Condition:
if one of the values is equal to the value:
value: Str_CurrID > is empty

Set Variable:
set ID_currID equal to Str_CurrID

....
Get Users:
List: UserSelections
Select only items when following is True:
show items when column:
ID ( from the list )
is equal to
ID_CurrID ( ID type variable )

Save "Username" ( from the list )
in: Pg_CurrUser ( person/group type )

....

Build string:
{WorkflowVariable:pg_AllUsers}{WorkflowVariable:pc_CurrUser}

save in: pg_allusers ( person/group type )

>>>
outside the "for each" loop:

Send notification.

to: pg_allusers 

then some text in the body..

0 Kudos
Reply