Hi All
Still fairly new to power apps and having an issue with the display properties of a toggle control.
Scenario - Once customer details have been added, flow sends an email to the customer in order to confirm address details and phone numbers are correct. On receiving the reply email, flow changes the value of the sharepoint column to confirmed...
I have created a customer details app. I have inserted a toggle control to display, when adding a new customer, (the Edit Customer Details screen is in "New" mode), the control is set to disabled, but once the value in Sp has been changed, the view details from gallery is correct, showing confirmed, but the Edit screen the toggle button is defaulting to Unconfirmed (false), so if the form is then resubmitted, it changes the value back to Unconfirmed.
I need to have the user be able to toggle this to confirmed if the customer does not repsond to the initial email and details are confirmed telephonically. but once confirmed, needs to stay and display true (confirmed)
I have tried this on default property
If(and(form2.DisplayMode = edit, ThisItem.Confirmed = true), Toggle2.Value = true, Toggle2.Value = false))
Getting this error
Incompatible type. We can't evaluate your formula because the values being compared in the formula aren't the same type
I have also tried leaving the default property blank and with just "" but no luck, advanced properties default still shows false
Is there anyway to set the default to gallery.selected parent value
Thanks in advance
Solved! Go to Solution.
Hi @samhudek ,
This needs to go on the Default of the Toggle
form2.DisplayMode = FormMode.Edit && ThisItem.Confirmed
so if both of those statements are true (there is no need to state =true on a Boolean value such as Confirmed), the toggle value will be true, otherwise it will be false.
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.
Thanks @WarrenBelz
For anybody reading this thread - TextInput1.Text = ThisItem.Confirmed sorted the problem
Hi @samhudek ,
This needs to go on the Default of the Toggle
form2.DisplayMode = FormMode.Edit && ThisItem.Confirmed
so if both of those statements are true (there is no need to state =true on a Boolean value such as Confirmed), the toggle value will be true, otherwise it will be false.
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.
Hi Warren
Thanks for the speedy response. I have tried that along with a couple of variations but still getting the same error
All 3 as well as my first attempts still giving this error
Hi @samhudek ,
Took me a while to spot it (also dangers of free-typing instead of testing on a model) - it needs to be (the full code)
Form2.Mode=FormMode.Edit && ThisItem.Confirmed
I have tested it here on a Form on a test list and got the results I expected.
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.
Hi Warren
My apologies, it is like that, if you click out of the formula box, power apps displays the formula in that shortened way
If it works on your test, made me think it might be something else in my app that could be causing this
Display mode for the toggle control was set to this
Changed this to the card Display Mode which was set to Parent.DisplayMode
Thought that had worked but it didn't (my apologies, marked as solution)
As a newbie, had set a textinput to visible off (note to self to leave doing that till last)
Hopefully this will clear things up a bit more... I didn't know how to link the toggle directly to the field so made this work around with a textinput
I have now modified the formula to this
Need to link the default of toggle now to the text input
Thanks @WarrenBelz
For anybody reading this thread - TextInput1.Text = ThisItem.Confirmed sorted the problem
Hi @samhudek ,
Sorry accidentally marked your question as solution (buttons are beside each other) - what you are saying is the Confirmed is a Text field, not a Yes/No? In this case the Default would be
Form2.Mode=FormMode.Edit && ThisItem.Confirmed = "Confirmed"
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.
User | Count |
---|---|
176 | |
111 | |
86 | |
44 | |
42 |
User | Count |
---|---|
228 | |
116 | |
115 | |
72 | |
67 |