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 / visibility of datacard...
Power Apps
Answered

visibility of datacards based on a range of values of another field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good morning,

 

In the app I am doing I want a number field B in a new form only to appear if the number inserted is off a specific range in a number field A 

 

So how i was thinking to do this was:

 

Switch( DataCardValue1.Selected.Value > 5; visible; <2 visible;) 

 

This new field B, has in the required - a condition to be required if visible.

 

am thinking correctly ? or this is not the correct way 

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,543 Most Valuable Professional on at

    Try this formula in the visible property instead.

    If( DataCardValue1.Selected.Value > 5; visible; <2 visible)
  • Verified answer
    Pstork1 Profile Picture
    69,543 Most Valuable Professional on at

    Sorry, not enough coffee

    If( DataCardValue1.Selected.Value > 5 || DataCardValue1.Selected.Value <2 ; true, false)
  • PK_Hong Profile Picture
    337 on at

    Hi @Anonymous 

     

    May write in such a way:

    - FormB.Visible = Switch(FieldA, Off Range, true)

     

    Just my wilf guess.

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about the Number Field A in your Edit form? Is it connected to a Number field in your data source?

    Is the DataCardValue1 represents the Text Input box within the Number field A data card?

    Do you want to display the Number field B within your Edit form only when the entered value within the Number field A is < 2 or > 5?

     

    Based on the formula that you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the the following workaround:

    Set the Visible property of the Number Field B data card in your Edit form to following:

    If(
     Value(DataCardValue1.Text) < 2 || Value(DataCardValue1.Text) > 5,
     true,
     false
    )

    If the DataCardValue1 represents a Dropdown box within your Edit form, please consider modify above formula as below:

    If(
     Value(DataCardValue1.Selected.Value) < 2 || Value(DataCardValue1.Selected.Value) > 5,
     true,
     false
    )

     

    If you want to mark the Number Filed B as Required when the Number Field B is visible, please take a try with the following workaround:

    Set the Required field of the Number Field B Data card to following:

    If(
     NumberFiledB_DataCard.Visible,
     true,
     false
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Apologies for late reply, was out last week and will resume this project late this week. will confirm it. Thank you for all 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 426

#2
WarrenBelz Profile Picture

WarrenBelz 381 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard