Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Hiding formula with two different values

(0) ShareShare
ReportReport
Posted on by 71

i have a hiding formula on the new entry form--=if([$StatusAnsuchen]=='Pending','false', 'true') that works fine so far. but now i´d like to add another statement based on other columns value (choice column)--=if([$Ansuchen]=='Andere','true', 'false') how can i add them together? i tried ...=if([$StatusAnsuchen]=='Pending','false', 'true' && [$Ansuchen]=='Andere','true', 'true')) but its not working...

thanks for any help

kurt

  • Kuno66 Profile Picture
    71 on at
  • Verified answer
    Expiscornovus Profile Picture
    31,648 Most Valuable Professional on at
    Re: Hiding formula with two different values

    Hi @Kuno66,

     

    I am happy to help. However, can you post this new question in a separate thread?

     

    This way we can separate the questions and solutions from each other. This also makes it a bit more reusable for the rest of the community 😀

  • Kuno66 Profile Picture
    71 on at
    Re: Hiding formula with two different values

    Hi..it´s me again...

    I have another question about a problem that has been dragging on for a long time.

    I use the hide field formulas on the new entry form to hide fields, that user doesn´t need to see.

    Everything work as expected just a date/time filed. "ErstellDat..gives me problems.

    If i use as default value Todays date everything works fine, but i can´t hide the field.

    If i use the calculated value Now() i can hide the field but it gives me a complete wrong date and time.
    I already checked the regional settings of client and sharepoint online. everything is on Central European...

    What is wrong?

    Kuno66_0-1626071689340.png

    wrong date

    Kuno66_2-1626071733628.png

     

     

  • Verified answer
    kuno6661 Profile Picture
    13 on at
    Re: Hiding formula with two different values

    thank you very much for your help.

    regards

    kuno

  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on at
    Re: Hiding formula with two different values

    @Kuno66, you can amend the expression to use nested if functions. But the expression becomes a bit longer:

     

    if(equals(outputs('Get_item')?['body/Ansuchen/Value'], 'Weiterbilding'), 'test@test.com', if(equals(outputs('Get_item')?['body/Ansuchen/Value'], 'Aussendienst'), 'aussendienst@test.com', if(equals(outputs('Get_item')?['body/Ansuchen/Value'], 'Abrechnung Aussendienst'), 'abrechnung@test.com', 'andere@test.com')))

     

     

    Or another approach would be to use a mapping array and filter that array based on that Ansuchen Value. I would suggest that approach when the amount of choices is a bit more.

  • Kuno66 Profile Picture
    71 on at
    Re: Hiding formula with two different values

    now it works.:-<))

    what if the 3 other choices map 3 differnet email address?

  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on at
    Re: Hiding formula with two different values

    Hi @Kuno66,

     

    In that case you could just use the false part of the if function for those other three choices. Below is an example.

     

    if(equals(outputs('Get_item')?['body/Ansuchen/Value'], 'Weiterbilding'), 'test@test.com', '3choicesemail@test.com')

     

  • Kuno66 Profile Picture
    71 on at
    Re: Hiding formula with two different values

    i have 4 choices "Aussendienst" - Weiterbildung - Abrechnung Aussendienst - Andere

    the other 3 choices can mapped to the same email adress.

  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on at
    Re: Hiding formula with two different values

    Hi @Kuno66,

     

    That is correct, the sample only works with the Weiterbildung choice. If you want it to work with other choices as well you need to amend the expression to meet that requirement. 

     

    Which other options do you have? And do they need to be mapped to the same e-mail address or to a different e-mail per choice option?

  • Kuno66 Profile Picture
    71 on at
    Re: Hiding formula with two different values

    i added a get item action and used the expression. now it workes but the flow fails with applying the grant access items. when i use the choice weiterbildung everything works fine, when i user some of the other coices flow fails and grant access rights are not apllied.

    Kuno66_1-1625826736362.png

    The 'inputs.parameters' of workflow operation 'Grant_access_to_an_item_or_a_folder' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'parameter/recipients' is required to be of type 'String/email'. The runtime value '"kuno66@test.com;admincloud@test.onmicrosoft.com;Sharepoint-Genehmiger@test.com;Sharepoint-Finanzdienst@test.com;Sharepoint-Personalamt@test.com;;Do nothing"' to be converted doesn't have the expected format 'string/email'.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow