0
votes

My DataSource is Excel file.I have gallery which consists of different Reference #'s, which On-click navigates the user to Update Status screen.

The Update Status Screen has the following Datacards:

  • "Cancel Reservation"
  • "Cancel Reason"
  • "Current Status"
  • "Steps"

I used the Visible property of Datacard such that when user Selects "Y" from "Cancel Reservation", it displays to them "Cancel Reason" and "Current Status" datacard.

Similarly, when "N" is selected it displays them "Current Status" and "Steps" datacard.

The Update Status screen consists of Submit button. The On-Select property of the Submit button is set to Submitform(form1).

Issue: When "N" is selected from "Cancel Reservation", "Cancel Reason" data is getting updated along with "Current Status" and "Steps" datacard.

I am new to PowerApps and wondering if there a way to update "Cancel Reason" and "Current Status" when "Y" is selected. Likewise, when "N" is selected it shud only update "Current Status" and "Steps"?

Note: "Cancel Reason","Update Status" consists of dropdowns.

1

1 Answers

0
votes

Conditional branching of Form controls can sometimes be tricky. The key for you is going to be the Default and maybe the Update property of each Datacard.

I imagine when user clicks the Reference # in the initial Gallery, you're setting NewForm(form1). This means the Default property of each dropdown is likely Parent.Default.

Experiment with setting these conditionally, similar to how you have Visibility set.

Example:

  • Set the Default property for "Current Status" and "Steps" Datacards to something like:
If(
    ddCancelReservation.Selected.Value = "N",
    "N/A"
)

Do something similar for the other cards. You can also mess with the Update property to control what data is written to the Sharepoint list.