cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stanford
Level: Powered On

Variables when subject contains Item ID Number

Hi Folks,

 

I'm building an ICT Help Desk for my organisation - So far I've created the flow 'When an email is recieved in a shared mailbox - create an item in sharepoint' and also 'when an item is modified in sharepoint - contact the email of the person who created the ticket to let them know.

 

Now the real problem I have is if I have a discussion over email regarding a ticket - every reply the end user makes will create another ticket with the subject and body of the email as the title and description of the ticket. 

 

I have tried to create variables where if the ID number of the ticket is in the Subject field then to not create an Item - my attempt hasnt worked so I shall show what i've tried to do down below. 

Capture.PNG

 

If anyone has any fix/suggestions that would be grand.

 

Many Thanks - Leon

4 REPLIES 4
Highlighted
Super User
Super User

Re: Variables when subject contains Item ID Number

@Stanford 

Hi there!  I think you're on the right path...just need to finesse the thing into working as you intend.  I'm not sure if your screengrab was from before you were finished with the Flow, but your condition might be missing the ticket number, right?20190716a.PNG

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Stanford
Level: Powered On

Re: Variables when subject contains Item ID Number

Thanks for the prompt reply - 

 

So yes I did input the ID tag there as I have screen captured but I do get a flow failure which completely confuses me.

 

I will attach both screenshots below - many thanks for your help and support so far 

 

Flow1.PNGFlow with ID tag in conditionFlow2.PNGflow failure message

Super User
Super User

Re: Variables when subject contains Item ID Number

Ah, ok so it's yelling at you because it wants a String and you're giving it a number (integer).  So we need to convert that somehow from Flow's perspective.

One option might be to initialize another (String) variable at the top of the Flow, and then inside the Apply to Each (above the criteria), Append the ID to that variable (I don't think a Set will work immediately in the loop...if it does, cool.  Otherwise try Append).  Then use that string variable in the condition instead of the SP ID field.

 

Maybe Compose would work, too, but I'm not familiar enough with that.

Keep on truckin'

 

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Stanford
Level: Powered On

Re: Variables when subject contains Item ID Number

Hi Ed,

 

Thanks for your reply - I'm completely lost at this point so I've tried to look into strings etc to see if I can implement them anywhere, so far this is what i've created but I'm not sure if I can paste this into a variable or function.

 

@or(
 contains(triggerBody()?['Subject'], 'Re'),
 contains(triggerBody()?['Subject'],'FW'),
 contains(triggerBody()?['Subject'],'Fw'),
 contains(triggerBody()?['Subject'],'Automatic reply')
        contains(triggerBody()?['Subject'],'#')
)
 
Let me know if this could potentially solve it.
 
Thanks 

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 154 members 4,170 guests
Recent signins:
Please welcome our newest community members: