To achieve the functionality where you submit a DataCard value based on either a dropdown selection or a TextInput in PowerApps, especially when you have a condition that shows a TextInput if the dropdown selection is "Other", you can use an If
statement within the DataCard's Update property. However, the correct syntax and logic are crucial to avoid errors.
Here's a step-by-step guide on how to set this up:
Dropdown1
.TextInput1
.TextInput1
visible.Set the Visible
property of TextInput1
to:
Dropdown1.Selected.Value = "Other"
This makes TextInput1
visible only when "Other" is selected in Dropdown1
.
To submit the value from either the dropdown or the TextInput based on the condition, you will use an If
statement in the Update
property of the DataCard. The Update
property should be set to something like this:
If(Dropdown1.Selected.Value = "Other", TextInput1.Text, Dropdown1.Selected.Value)
This If
statement checks if the selected value of Dropdown1
is "Other". If it is, it uses the text from TextInput1
for the update. Otherwise, it uses the selected value from Dropdown1
.
Update
property match with what you're providing. For example, if the DataCard expects text, both parts of the If
statement should return text.Dropdown1.Selected.Text
instead of Dropdown1.Selected.Value
.By following these steps and considerations, you should be able to configure your DataCard to submit data based on either a dropdown selection or a TextInput value without encountering errors.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399