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

Notifications

Announcements

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:
I have the same question (0)
  • developerAJ Profile Picture
    4,643 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,643 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard