I am trying to use the same editform and same column in my SQL database, but have the control provide a different option for the user depending on a checkbox selection.
On one hand, if the checkbox is selected I want the control to show a free-form text box for entry.
On the other hand, if the checkbox is blank, use a dropdown list of available selections.
The issue is that this is just a visibility switch and the form is still going to save the last edited card. This is especially problematic for existing database entries that see adjustment. If a value is already present or gets fat-fingered in and not removed before submission and there are selections/text in both entries spaces, the form struggles to know which entry to retain.
Does anyone know how to essentially switch off one card or the other, depending on what is visible or set otherwise so that only the expected of the two cards saves/updates on the database? I've tried having two separate controls but its the same outcome.
Solved! Go to Solution.
Hi @Ginko ,
The Visible would simply be (Text Box)
YourCheckBoxName.Value
and (Drop-Down)
!YourCheckBoxName.Value
The Update of your Data Card
If(
YourCheckBoxName.Value,
YourTextBoxName,Text,
YourDropdownName.Selected.Value
)
this is assuming your drop-down is a Choice column or hard-coded.
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.
Visit my blog Practical Power Apps
Hi @Ginko ,
The Visible would simply be (Text Box)
YourCheckBoxName.Value
and (Drop-Down)
!YourCheckBoxName.Value
The Update of your Data Card
If(
YourCheckBoxName.Value,
YourTextBoxName,Text,
YourDropdownName.Selected.Value
)
this is assuming your drop-down is a Choice column or hard-coded.
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.
Visit my blog Practical Power Apps
Warren that is perfect, thank you! It didn't dawn on my to treat the Update field with an If statement, that's so helpful for a number of my controls, you rock!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
196 | |
45 | |
45 | |
44 | |
36 |
User | Count |
---|---|
278 | |
81 | |
81 | |
78 | |
69 |