cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ethan_R
Continued Contributor
Continued Contributor

DropDown Control to Toggle Control

Hi All,

I have a Collection of 2 records only.

I made a dropdown to select those 2 records. 

Screen has multiple labels and some fill properties displays based on Dropdown selected.

Instead of using Dropdown, can I use Toggle control?

If Yes, How can i select record from Collection ?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ethan_R ,

I am a little unclear as to whether your last post contained a question.

If you always have the same two people, you can set the OnChange of the Toggle to

If(
  Self.Value,
  Do whatever person 1,
  Do whatever person 2
)

with Self.Value being true. You can also set the TrueText and FalseText to the relevant people.

 

Please click Accept as solution 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.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Ethan_R ,

A Toggle only has two possible results - true and false, so unless you want to hard code the possibilities from the Collection to one of these two values in the TrueText and FalseText, you could consider using a Radio Control with the Items of CollectionName.FieldName

 

Please click Accept as solution 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.

Ethan_R
Continued Contributor
Continued Contributor

Hi @WarrenBelz ,

So is it possible that using UpdateContext we can change/select value from dropdown or a record from the collection ? As variables are working with toggle.

@Ethan_R ,

UpdateContext is setting a Context Variable (local to the screen). If you are referring to making this conditional on the true/false result of the toggle, then I guess you could do it this way, but I cannot see your model.

 

Please click Accept as solution 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.

Ethan_R
Continued Contributor
Continued Contributor

Hi @WarrenBelz ,

 

My App consists of 1 Collection holding 2 records.

They are 2 people with their respective details.

 

The App has 1 Dropdown currently where I select Person A or Person B, based on selection the App has different fields that selects property of that value like Name, Contact Info, Email, etc.

 

Now the Dropdown looks odd and dull on the Screen

So that's why i thought of Toggle Control as it has 2 option style

So If Checked then Person B else A.

 

But selection of the record via toggle is tricky and dropdown is not looking that good.

 

Hi @Ethan_R ,

I am a little unclear as to whether your last post contained a question.

If you always have the same two people, you can set the OnChange of the Toggle to

If(
  Self.Value,
  Do whatever person 1,
  Do whatever person 2
)

with Self.Value being true. You can also set the TrueText and FalseText to the relevant people.

 

Please click Accept as solution 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.

View solution in original post

Ethan_R
Continued Contributor
Continued Contributor

Thanks @WarrenBelz ,

I used this for with another method.  

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,246)