
Announcements
I've been working on this project for awhile now and in the past couple days, I was cleaning things up for launch. I had always ran the app through the preview option within the editing window. When I published the app and opened it in 'Play Mode', many parts of my app were no longer working.
I have this page where the user enters in justifications for numbers they have previously submitted.
Each text box you see here has the following in their 'Default' Property:
If(Approved,CategoryReference.PercentTotal,CategoryReference.PercentPending)Since the data may or may not be approved, this allows the users to use their last submission as a starting point whether their submission has been approved or not.
Once the user has filled out the form, they will click the preview button which will take them to a page that presents the entire form that they just filled out. When they click the button, it first checks if the required fields have been filled out and if so, patches the input to the pending columns in CategoryReference and then changes approved to false.
This is the code inside the Preview Button:
//If any of the required fields are empty, the user will not be able to progress
If(IsBlank(PercentTotalInput.Text) || IsBlank(Q1Input.Text) || IsBlank('Q2.1Input'.Text) || IsBlank('Q2.2Input'.Text),Set(RequiredFields,true),
Set(RequiredFields,false);
//Updating the 'CategoryReference' variable with input fields. All values are put into the pending columns.
Set(CategoryReference,Patch(CategoryReference,{
PercentPending: Value(PercentTotalInput.Text),
eCommerceBusinessContextPending: Q1Input.Text,
eRetailSearch1Pending:'Q2.2Input'.Text,
eRetailSearch2Pending:'Q2.2Input'.Text,
eCommerceMedia1Pending:'Q3.1Input'.Text,
eCommerceMedia2Pending:'Q3.2Input'.Text,
OtherRetailerPaidMedia1Pending:'Q4.1Input'.Text,
OtherRetailerPaidMedia2Pending:'Q4.2Input'.Text,
AdditionalInfoPending:Q5Input.Text
}));
//Prepares to preview and navigates
Set(Approved,false);
Set(PreviewSetting,1);
Navigate(Preview,Fade)
)
This should (and does in preview mode) fill the variable with the relevant data but it doesn't in 'Play Mode'. Instead, when the Preview Button is clicked, all of the inputs are cleared and then it moves to the next page. I don't get why the app is acting differently when all of the code is the same. Is this a known issue?