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 / Make DataCard required...
Power Apps
Answered

Make DataCard required/visible based on inputs of another DataCard

(1) ShareShare
ReportReport
Posted on by 10
Hello, I am currently trying to create an Form that needs to make an DataField appear if specific values are being choosen (see Screenshot 1). 
 
To be precise, 3 out of 11 Values (Screenshot 2) need to trigger the DataField "Alternative Supplier" as visible. The catch is that a multiple selection must be possible within the DataField "Material Category". 
 
This means that as soon as one of the three relevant material categories is being choosen, the "Alternative Supplier" field must be triggered.
 
I only used 
 
If(DataCardValue113.Selected.Value="Yes";true;false)
 
so far. This worked out for me since all of the fields only used a "yes" or "no". I never needed to include more than one condition.*
 
I need something like:
 
If("Material Category".Selected.Value="A201 or A314 or D506";true;false)
 
Can you support me somehow?
 
Thanks in advance. 
 
*edit: The example I showed has been added to the "visibility" field of the respective DataCard I want to make in/visibile.
Screenshot1.png
Screenshot2.png
Categories:
I have the same question (0)
  • Suggested answer
    AmínAA Profile Picture
    1,228 Moderator on at
    Greetings!

    Well, you can certainly try something like the following!
     
    If(
        Or(
            DataCardValue113.Selected.Value = "A201",
            DataCardValue113.Selected.Value = "A314",
            DataCardValue113.Selected.Value = "D506"
        );
        true;
        false
    )
    
     
    It's pretty much basic, but that should suffice for you . . .
     
    Hopefully that's enough to solve your problem, if so, feel free to mark this reply as an answer, otherwise feel free to reply!
  • max.030 Profile Picture
    10 on at
    Hey @AmínAA, 
     
    damn, you are quick! Thank you! It is indeed very basic, unfortunately I am not an expert and need to work mostly with youtube tutorials and this forum that already helped me a lot. 
     
    That being said, I tried to implement what you just posted by it tells me that seemingly somewhere is a mistake.
     
    Any idea what the issue could be?
     
     
  • AmínAA Profile Picture
    1,228 Moderator on at
    Hi there Max.030!
     
    The error is pretty simple I forgot to change the commas for semicolons just switch the "," of your code with ";". That should do the trick!
  • max.030 Profile Picture
    10 on at
    It now makes the field visible whenever at least one of the 3 Numbers is being choosen. 

    The problem is, whenever you choose a different number than one of the three, the field is unvisible again. I get the logic why this happens, but no chance to translate it into code. Any idea how this could be approached? 
     
    If(
        Or(
            DataCardValue113.Selected.Value = "A201";
            DataCardValue113.Selected.Value = "A314";
            DataCardValue113.Selected.Value = "D506"
        );
        true;
        false
    )
  • Verified answer
    AmínAA Profile Picture
    1,228 Moderator on at
    Sure thing, something like this should be able to accomplish that without any problems!
     
    If(
        CountIf(
            DataCardValue113.SelectedItems;
            Or(
                Value = "A201";
                Value = "A314";
                Value = "D506"
            )
        ) > 0;
        true;
        false
    )
    
     
  • max.030 Profile Picture
    10 on at
    This worked for me! It may be a small step for you, but a huge one for me. Thank you!
  • AmínAA Profile Picture
    1,228 Moderator on at
    You're welcome max.030!
     
    Every step forward, no matter small or huge, is progress. Keep it up!

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 833

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 383

Last 30 days Overall leaderboard