web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Replace Dynamic conten...
Power Automate
Unanswered

Replace Dynamic content with message when writing to SharePoint list using expressions?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

Does anyone know how I can replace content being written to a SP list based on the value of the dynamic content. Ideally something with the same logic as shown below. 

 

IF value = 1234

Change to Test text 

Else use dynamic content.

 

Cheers,

Adam

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    How about this:

     

    if(equals(triggerBody()?['ColumnA'],'1234'), 'test text', triggerBody()?['ColumnA'])
     
    In my example, if Column A = 1234, then return "test text" otherwise use the value in ColumnA
     
    Please post here and let me know if this solves your issue.
     
    Scott
     
    TestText1.jpg
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please share a bit more about your scenario?

    Further, could you please share more details about your SharePoint list?

     

    I agree with @ScottShearer's thought almost, I think the if() function could achieve your needs. I have made a test on my side and please take a try with the following workaround:10.JPG

    The Column B field set to following formula:

    if(equals(triggerBody()?['Column_x0020_A'],'1234'),'Test',triggerBody()?['Column_x0020_A'])

    Note: The Column A and Column B are both Single line of text type column in my SharePoint list. In order to include the Dynamic content within your if expression, you should firstly select the if expression, then select the Dynamic content tab and simply click the field you want to use.

     

    The flow works successfully as below:

    If the Column A is equal to 1234:11.JPG

    If the Column A value is not equal to 1234:12.JPG

     

     

    More details about using expression in flow actions, please check the following article:

    Use expression in flow actions

     

    More details about the if() function, please check the following article:

    https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#logical-functions

     

     

    Best regards,

    Kris

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, 

     

    Thanks for your help.

    When I used this code and added my dynamic content as you mentioned it wasn't giving me any errors and running was successfully. 

    But the name in the sharepoint list did not change at all.

    Any ideas on how to fix this problem? 

     

    heres my code below:

    if(equals(triggerBody()?['requester_id'],'12345678'), 'requester name here',triggerBody()?['requester_id'])
     
    My goal is to be able to take the freshdesk requester ID and change it to the name of the requester for ease of use.
     
    Thanks, 
    Adam
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, 

     

    Thanks for your help.

    When I used the code Scott provided and added my dynamic content as mentioned it wasn't giving me any errors and running was successfully. 

    But the name in the sharepoint list did not change at all.

    Any ideas on how to fix this problem? 

     

    heres my code below:

    if(equals(triggerBody()?['requester_id'],'12345678')'requester name here',triggerBody()?['requester_id'])
     
    My goal is to be able to take the freshdesk requester ID and change it to the name of the requester for ease of use.
     
    Thanks, 
    Adam
  • ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    Can you post a screenshot of your Flow?  This will make it easier to assist.

     

    What type of column is requester_ID?  Person or Group?  Text Column?

     

    Also, does the run history provide any clues to why the column is not being updated?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Capture.PNG Request ID goes into the customer field in the SP list which is a single line of text.

  • ScottShearer Profile Picture
    25,280 Most Valuable Professional on at

    I am wondering if there is an issue with the requester_id column. 

    Can you take a look at the run history and see if you are getting anything back?

     

    Try inserting just the requester_id into the customer column (remove the expression) and see if it works (as a test).

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard