cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ggalindo
Helper I
Helper I

Trigger the flow only when adding text to a field

Hello everyone

 

I'm trying to get some help with a flow or any ideas on how to make this work.  The idea is to send an email when text is added to a field in this case Comments (multiline text)only, and the issue status value is on hold. 

 

The problem I have is that every time anything else in the item is updated or the status changes, it triggers the flow sending an empty email. 

 

The project is creating a ticking system in which the users can email a request, and the support team can answer the request. 

The first part is working great the user is able to email a request is capture and an item is created on a SharePoint list. The only problem I have is how to trigger the output flow only when the status is On Hold and when comments are added to the request. 

 

Communication flow.JPGCommunication flow 2.JPG

11 REPLIES 11
Kikoger
Resolver I
Resolver I

Hi,

 

you can solve this issue by creating a second column along the lines of comments_old. At the beginning of your flow, after the trigger, you should insert a condition that checks if comments is equal to comments_old. Put the rest of the flow action into the No branch, leave the Yes branch empty. At the end of the actions, make sure you "Update item" and set comments_old to comments, so the flow does not end up in an infinite loop.

 

Max

efialttes
Super User
Super User

Hola!

It seems you are looking for Conditional trigger functionality

So, the flow is executed only if the condition is met. Please note it is reprsented as a WDL expression

 

I would recommend to add the logic first as an action block just after the trigger, once you test it and it is working properly, you can port the condition logic to the conditional trigger

Blog_KeyHolder_8.png

Please also note if the item is modified again and again once the Status was set to onhold and Comments were also added, you will probably need some extra functionality. Activating Version History on your Sharepoit List and comparing current version VS last version by means of 'Send an HTTP request to Sharepoint' can be a valid approach, but a bit more complex to implement than @Kikoger suggestion

 

Please let us know your progress, if you find any issue implementing this approach do not hesitate to share a screenshot from your flow design and the problem encountered

¡Ánimo!

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@Kikoger - In my list, I have two columns.

 

The first Column one is called "description" which captures the email sent to a shared mailbox from the users asking for a request. version history is turn on. 

 

The second column is called "Comments" which I would like to the support team to answer questions about the request. 

 

I tried using both columns adding the condition that checked if Comments is not equal to Description if Yes I have the branch extracting the text and adding it to the body of the email.  By doing so it ran but I would go back to the Issue and change the priority and it will trigger the branch but without the text from Comments. 

@efialttes Hola!

 

I looked into the conditional trigger which makes a lot of sense but I haven't got it to work. 

sample of conditional trigger I tried- 

@equals(triggerBody()?['Status']?['value'],'On Hold') 

Hola de nuevo!

Not in my laptop, unable to test. Capital 'v', perhaps?

 

@equals(triggerBody()?['Status']?['Value'],'On Hold') 

 

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes Hola,

 

I changed the V to v and still the same

trigger flow.JPG

@efialttes 

Hola de nuevo!

I would remove temporarily your conditional trigger, then implement the condition with a 'Condition' action block just after the trigger, so you can add your Choice column value from Dunamic content menu and ensure its internal name matches the one you are using, just hover the mouse over it once added

If not the case, then maybe there is a hidden space before or after 'On hold', either in you WDL expression or on the choice column values defined in your Sharepoint list

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@ggalindo 

Any progress with your issue? Did you finally solve it?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes  No, I am still trying to figure it out

@ggalindo 

Are you sure the internal column name is 'Status'?

According to your first screenshot, the column display name seems to be 'Issue Status' or something similar, right? You can doubleckeck what the internal column name is by adding temporarily the 'Condition' action block with its original condition rule and hovering the mouse over 'Issue status Value' dynamic content menu. Then execute the flow just for testing purposes and verify the condition works as expected when defined inside a 'Condition' action block, finally replace it with a Conditional trigger

¡Ánimo!

Flow_ggalindo.JPG



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,798)