cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

CDS 2 choices field - toggle instead of dropdown datacard

I have a number of 2 choices fields in CDS. I am trying to create a powerapp that has toggles to switch these on and off. PowerApps inserts a dropdown as a default and will not allow me to switch to a toggle. I have deleted the dropdown and inserted a toggle and attempted to change the Update control of the datacard according to the below thread, but it doesn't seem to work. 

https://powerusers.microsoft.com/t5/Building-Power-Apps/CDS-entity-boolean-field-coming-as-dropdown-...

 

The formula i have used in the Update Control is: If (ElectricyToggle.Value=true, 'T5 Electricity'('Take 5S').Yes,'T5 Electricity'('Take 5S').No)

 

Super appreciate any help!  

 

13 REPLIES 13
Highlighted

Thanks so much for clarifying - i'll try it out and let you know 🙂

Highlighted

Hi again @v-xida-msft I've tried that formula in the Update section. I am no longer getting an error, which is great! (not quite sure if it works yet), but now i am confused about the code you have recommended in the Default part of the Toggle itself.  I'm not quite sure what that will do, and also, my Powerapps doesn't seem to like the formula as you can see below.  Any thoughts?

Highlighted
Community Support
Community Support

Hi @Cym ,

Based on the screenshot that you mentioned, I found that you have a mistake with your operation. You should add the Toggle control within the T5 Electricity field data card rather than outside the T5 Electricity field data card in your Edit form.

5.JPG

Note: Please consider remove the Toggle control from your Edit form, then select the T5 Electricity field data card, then click "Insert"-> "Toggle" control, make sure the Toggle control is added within the T5 Electricity field data card rather than outside.

The ThisItem operator only works when you add the Toggle control within the T5 Electricity field data card. The formula I provided above within the Default property of the Toggle control is used to display proper Toggle status when you edit an existing record. If you do not apply the formula I provided above within the Default property of the Toggle control, the Toggle control would remain same default status regardless of whether or not you add or edit an record.

 

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.
Highlighted

You legend @v-xida-msft !  It works!  Thankyou!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Users online (11,548)