cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mhystique
Level: Powered On

Yes/No toggle not showing

Hi

I have created a PowerApps on top of a Sharepoint list, and are having some issues with the Yes/No toggle.

When I test the App it seems okay, but when I click a link (sent from a Flow) to open the App I can't see the toggles, or maybe just a few letters of the false statement.

But if I choose to edit I can see the toggles.

In my picture you can see an example. The left is when I edit the record, the right is when I opened it at first, by clicking the link.

 

On the datacard I have changed DisplayMode to 

 

If(MyACLprofile.IT_RW;DisplayMode.Edit;DisplayMode.View)

 

and Visible to 

 

MyACLprofile.IT_RW

 

and yes I am member of the MyACLprofile.IT_RW group… 🙂

 

Why is the toggles not showing correct?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Yes/No toggle not showing

Hi @Mhystique ,

Please consider set the Items property of the Radio control to following:

["Yes", "No"]

set the Default property of the Radio to following:

If(ThisItem.'Yes/No Field' = true, "Yes", ThisItem.'Yes/No Field' = false, "No")

 

Set the Update property of the 'Yes/No' field data card (in your Edit form) which contains the Radio to following:

If(
   Radio1.Selected.Value = "Yes",
   true,
   Radio1.Selected.Value = "No",
   false
)

 

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

 

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.

View solution in original post

12 REPLIES 12
Community Support Team
Community Support Team

Re: Yes/No toggle not showing

Hi @Mhystique ,

Which form do you opened when you click a Web Url Link from your email body? Edit form or Display form?

 

If the form you opend when you click a Web Url Link is a Display form, it is actually the normal behaviour with the Toggle control within Display form. The DisplayMode property of the controls (e.g. Toggle) within the Display form would be overrided by that from your Display form itself.

 

The user @carem has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Keep-Toggle-Control-format-when-For...

 

As an alternative solution, you could consider modify your app to navigate to the Edit form directly when you click the Web Url Link from the email body. Then based on the passed parameter value (e.g. List Item ID value) from the Url, open specific record within the Edit form.

Please check my response within the following thread for more details:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Embedded-link-to-a-Sharepoint-List-...

 

In addition, you could also consider take a try with the alternative solution mentioned within above first thread I provided -- remove the Toggle control from your Display form, instead, add a Radio control to display the Yes/No field value.

 

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.
Mhystique
Level: Powered On

Re: Yes/No toggle not showing

I'm fairly new to PowerApps, so is still fumbling around.

How do I check if the opened form is in Edit or Display mode? Thought what changing DisplayMode on the items, but I guess not.

 

I have just skimmed the links you pasted, but is it true that Yes/No only shows this slider thing, when in Edit mode and if in Display mode it just shows the text? If so that is just plain stupid...

Maybe I should try to use a radio button instead as you said.

Community Support Team
Community Support Team

Re: Yes/No toggle not showing

Hi @Mhystique ,

If all custom fields are Read-Only within the form, the form would be Display form. If you could edit some fields within the form, the form is Edit form.

 

It is an known issue with the Toggle control, if you would like this feature to be improved, please consider submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider remove the Toggle control from the 'Yes/No' field data card in your Display form, instead, add a Radio control to display values.

 

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.
Mhystique
Level: Powered On

Re: Yes/No toggle not showing

I can edit fields depending on which user I log in with.

It is controlled by the ACL list, and with the help of the Visible and DisplayMode parameters. So if you shouldn't have access to a field, it will not be visible to you. That I control by the Visible property on the DataCard.

 

If you need access, if may only be as a View or Edit depending on your permissions. That I control by the DisplayMode.

 

That gives me 3 kind of users and behaviors.

  1. Users that needs to edit.
  2. Users that needs to see things from point 1
  3. Users that needs to see other things.

2 and 3 are pretty much the same, but I need to be able to control what some users see, as this new GPDR rules dictates it.

This seems to work for text and date fields, but not for toggles.

Mhystique
Level: Powered On

Re: Yes/No toggle not showing

When I remove the toggle and place a radio button instead on my datacard, it gives me and error.

It says that the Update property on the datacard is wrong. It basically tries to change the value of the now removed toggle - logical with the error.

But what should I put in instead? If I type in Radio1.Selected.Value it gives me an warning that it expects true or false values and that the value can cause unexpected behavior.

Community Support Team
Community Support Team

Re: Yes/No toggle not showing

Hi @Mhystique ,

Please consider set the Items property of the Radio control to following:

["Yes", "No"]

set the Default property of the Radio to following:

If(ThisItem.'Yes/No Field' = true, "Yes", ThisItem.'Yes/No Field' = false, "No")

 

Set the Update property of the 'Yes/No' field data card (in your Edit form) which contains the Radio to following:

If(
   Radio1.Selected.Value = "Yes",
   true,
   Radio1.Selected.Value = "No",
   false
)

 

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

 

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.

View solution in original post

Mhystique
Level: Powered On

Re: Yes/No toggle not showing

 Great changing the Update removed the warning. At the same time I changed Default to just No.

It is a task thing, so I need it to be No or False until the task has been performed.

 

But again I can't edit the radio button on the form, like with the toggle. I don't want the users to click a edit button in top of the app before they can edit things. They should just start the form and depending on permissions they should be able to see and or edit the fields. How do I do that without compromising the general security?

Mhystique
Level: Powered On

Re: Yes/No toggle not showing

Okay I'll have to take my words back, as I now see that no fields are editble when I open the form.

Isn't this possible to achieve?

My Sharepointform's DefaultMode is Edit

Community Support Team
Community Support Team

Re: Yes/No toggle not showing

Hi @Mhystique ,

Do you want to navigate to your Edit form when you open your app from the Web Url Link?

 

If you want to navigate to your Edit form when you open your app from the Web Url Link, please consider use Navigate function to navigate to the Edit screen (which contains the Edit form) when you open your app from deep URL link.

 

Set the OnStart property of the App to following:

Set(ParameterValue, Param("Param")); // I assume that you pass a parameter value from your URL link to your app
If(
   !IsBlank(ParameterValue),
   Navigate(EditScreen)
)

Set the DefaultMode property of the Edit form to following:

DisplayMode.Edit

 

Please consider take a try with above solution, check if the issue is solved. Also please refer to the following thread:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Embedded-link-to-a-Sharepoint-List-...

 

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,546)