cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

Radio button and Hide Data Card

Hello,

 

I have this question?

 

I have 4 Datacards, the datacards are for locations.

If I have a Radio with items = ["1","2","3","4"]

 

by default is "1" mean always at least 1 location will be visible.

But if I select 3, I would like to see location 1, 2  and 3

If I select 4, I would like to see location 1 to 4

 

I have been trying a couple of conditions in visible property of the datacard but I can get it.

 

Any help?

 

If(Radio3.Selected.Value = "2" || "3" ||"4",true,false)

 

Thanks in advance

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
mdevaney
Super User
Super User

@sajarac 

Change the radio button Items to this code and don’t use quotation marks

 

[1,2,3,4]

 

Then put this code in the Visible property of the location 1 datacard

 

Radio.Selected.Value >= 1

 

Then put this code in the Visible property oft he location 2 datacard

 

Radio.Selected.Value >= 2

 

Then put this code in the Visible property of the location 3 datacard

 

Radio.Selected.Value >= 3

 

Then put this code in the Visible property of the location 4 datacard

 

Radio.Selected.Value >= 4

 

--
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

I think that I got it, but you point me in the right direction:

 

Radio items = ["1","2","3","4"]

Default "1"

 

DatacardLocation1

Visible = true

 

DatacardLocation2

Visible = If(Radio3.Selected.Value = "2" ||Radio3.Selected.Value = "3"||Radio3.Selected.Value = "4",true,false)

 

DatacardLocation3

Visible = If(Radio3.Selected.Value = "3"|| Radio3.Selected.Value = "4",true,false)

 

DatacardLocation4

Visible = If(Radio3.Selected.Value = "4",true,false)

 

And is working fine.

 

Thank you very much for your guidance.

 

Kudos to me........LOL

View solution in original post

Hi @sajarac ,

 

I am very glad that issue is resolved but you can also try this, if you want:

Datacardvalue 2:
If(Radio3.Selected.Value = "2" ||Radio3.Selected.Value = "3"||Radio3.Selected.Value = "4",true,false)
 
Datacardvalue 3:
If(Radio3.Selected.Value = "3"|| Radio3.Selected.Value = "4",true,false)
 
Datacardvalue 4:
If(Radio3.Selected.Value = "4",true,false)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

7 REPLIES 7
mdevaney
Super User
Super User

@sajarac 

Change the radio button Items to this code and don’t use quotation marks

 

[1,2,3,4]

 

Then put this code in the Visible property of the location 1 datacard

 

Radio.Selected.Value >= 1

 

Then put this code in the Visible property oft he location 2 datacard

 

Radio.Selected.Value >= 2

 

Then put this code in the Visible property of the location 3 datacard

 

Radio.Selected.Value >= 3

 

Then put this code in the Visible property of the location 4 datacard

 

Radio.Selected.Value >= 4

 

--
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-xida-msft
Community Support
Community Support

Hi @sajarac ,

Do you want to disable the Location data card based on the selected value in your Radio button?

 

I have made a test on my side, please consider take a try with the following workaround:

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

If(
   Value(Radio3.Selected.Value) >= 1,
   true,
   false
)

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

 

If(
   Value(Radio3.Selected.Value) >= 2,
   true,
   false
)

 

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

 

If(
   Value(Radio3.Selected.Value) >= 3,
   true,
   false
)

 

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

 

If(
   Value(Radio3.Selected.Value) >= 4,
   true,
   false
)

 

Please try above solution, check if the issue is solved. It is no need to change the formula within your Radio button Items property.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft 
Did you read my post?  I am already using the same method as yours...

 

Also, did you know that the IF statement is not necessary inside the Visible condition?  You can shorten your code like this:

Value(Radio1.Selected.Value)>=1
Value(Radio1.Selected.Value)>=2
Value(Radio1.Selected.Value)>=3
Value(Radio1.Selected.Value)>=4

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Good morning, yes I did.

 

And thank you very much, I am testing now. One little thing if I select "3" will be 2 and 3 visible? if I select "4" will be 2, 3 and 4 visible?

 

I think that I got it, but you point me in the right direction:

 

Radio items = ["1","2","3","4"]

Default "1"

 

DatacardLocation1

Visible = true

 

DatacardLocation2

Visible = If(Radio3.Selected.Value = "2" ||Radio3.Selected.Value = "3"||Radio3.Selected.Value = "4",true,false)

 

DatacardLocation3

Visible = If(Radio3.Selected.Value = "3"|| Radio3.Selected.Value = "4",true,false)

 

DatacardLocation4

Visible = If(Radio3.Selected.Value = "4",true,false)

 

And is working fine.

 

Thank you very much for your guidance.

 

Kudos to me........LOL

@sajarac 
I'm glad you fixed it!  Please pick a solution if the thread is now closed.

 

You may pick as many solutions as you like or you can just pick your own, doesn't matter as long as the thread is closed.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hi @sajarac ,

 

I am very glad that issue is resolved but you can also try this, if you want:

Datacardvalue 2:
If(Radio3.Selected.Value = "2" ||Radio3.Selected.Value = "3"||Radio3.Selected.Value = "4",true,false)
 
Datacardvalue 3:
If(Radio3.Selected.Value = "3"|| Radio3.Selected.Value = "4",true,false)
 
Datacardvalue 4:
If(Radio3.Selected.Value = "4",true,false)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,952)