Skip to main content

Notifications

Power Platform integration forum
Suggested answer

extracting an #ID from email subject

Posted on by
Hi,
 
I have a flow that I would like to use to update a list item. The ID of the item is contained within the email subject in this form: /#REF1234 Whatever subject follows/ where 1234 is the id. I am looking for the proper function to isolate the ID following #REF from the string this could be any number of digits following #REF. I am unsure one function alone can achieve this, I tried searching a bit and array might seem to be one way to go but i wasn't exactly sure where to start.
 
thanks
  • Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    extracting an #ID from email subject
    Hi,
     
    Has the issue been solved?
    Have there been any updates? Please feel free to ask me if you have any questions!
    If it has been resolved, can you mark the response as an answer?
     
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    extracting an #ID from email subject
    Hi,
     
    Is the format of your subject field values fixed?
    For example: #REF1234 space Whatever subject follows
    The #REF always comes first, followed immediately by the ID, then a space followed by the text.
     
    If so, then you can use the following expression.
    slice(outputs('Get_a_row_by_ID')?['body/subject'], 4, indexOf(outputs('Get_a_row_by_ID')?['body/subject'], ' '))
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,377 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans