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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sharepoint or Power Au...
Power Apps
Unanswered

Sharepoint or Power Automate IF statement

(0) ShareShare
ReportReport
Posted on by 6

Hi

I'm not sure the best way to approach this so any help is gratefully received.

 

I have a SharePoint list. Column A is multi-choice, and Column B is currently blank. I need either an IF statement or PA Flow, for Column B, which returns a value based on Column A. So if the user selects Red and Yellow in A, I want B to return Primary ( for example).  I can work out the variations later but I'm not sure what's the best way to approach this as Column A is set as a "Choice" field. TIA

Categories:
  • developerAJ Profile Picture
    4,763 on at

    if its powerautomate 

    itemiscreated or modified

    you can use select action. Input would be choice column name for trigger

    now you have an array ["Red","Yellow"]

    next you can use join input Sort(output of compose action) expression ; or whatever you want 

    now you have string Red;Yellow

    which you can compare for the conditions you need to set.

     

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    You can connect with me on LinkedIn

  • JatinSaini Profile Picture
    428 on at

    If your column B value is only going to be dependent on the Column A value then the best and easy approach is to create a Calculated Column within the sharepoint list.
    For the calculated column (Column B) you can simply provide the If conditions based on your requirements in context wit the column A. 

    Example code for calculated column B (column type - Single line text):

     

    =IF([ColumnA]="Red","Primary")

     

    ...so on

  • ARunio Profile Picture
    6 on at
    • Thanks @JatinSaini - I have tried this but I keep getting a failure alert as the column type isn't supported. I presume from this that an IF statement in SP doesn't work on a 'Choice' column? 
  • ARunio Profile Picture
    6 on at

    Many Thanks @developerAJ - I'll try your PA solution above. 

  • JatinSaini Profile Picture
    428 on at

    Hi @ARunio ,

    If that's the case, then you can do one more thing if you have not made up your mind to work around PA.

     

    Here's what another thing you can do within the powerapps only.

    Assuming that you are using a Form Control to submit your data. 
    Do below steps:

    Remove the Column B data card from the Form Control Fields.

    After submitting the Form apply below code:

    Set(lastSubmitID, Form.LastSubmit.ID);

    UpdateIf(Sharepoint, And(ID=lastSubmitID, ColumnA.Value="Red"),{ColumnB:"Primary"});

     

    ..so on

  • developerAJ Profile Picture
    4,763 on at

    if powerapp is your front end you dont need powerautomate.

     

    You can achive same logic i mentioned with simple formulae in powerapp

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard