cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

conditions on data fields

Hi

I've some strange behaviour on my canvas app form, linked to SPO.

I have a toggle field with Approved or Rejected, the default of the toggle is set to Rejected, I've hidden a bunch of fields when its set to rejected, but if approved the fields show up.
This works, but when I submit the form for another user to view, the button changes to rejected, meaning the other fields are no longer visible.

Does anyone know why this may occur?

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous
Since it’s an Edit Form I would suggest changing the Default property of the toggle to:

ThisItem.your_column_name

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

View solution in original post

5 REPLIES 5
mdevaney
Super User
Super User

@Anonymous
Check the default property of your toggle. Can you let me know what code you see there.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Anonymous
Not applicable

Hi @mdevaney,

 

it set to false, see snippet

@Anonymous
I think your toggle is changing back to the default value when submitted. Did you use an Edit Form here or are you using Patch? Please show your code used to submit the form.
Anonymous
Not applicable

Hi @mdevaney 
it's an edit form, I haven't got my head around using patch yet.

I've got multiple screens with the same edit form, to cater for another scenario, but this issue it appears to be a problem as soon as I save the form, the toggle changes back to false, thus the fields which have data are no longer visible, I can't see what is causing this behaviour, but is there a way to say if a field has a value, the toggle cannot be changed, or change to false?

@Anonymous
Since it’s an Edit Form I would suggest changing the Default property of the toggle to:

ThisItem.your_column_name

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

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (3,629)