Hello everyone. So firstly, here is my code:
If(CountRows(errorGallery.AllItems) < 1,
Patch(
Leads,
Defaults(Leads),
{LeadContactName: txtContactName.Text, LeadPhone: txtContactPhone.Text, LeadContactNotes: txtNotes.Text, LeadEntryDate: Date.SelectedDate, AgentEmail: vAgent.AgentEmail, crb4e_lead: Concatenate(txtContactEmail.Text, " -- " , Now())}),
varSubmit && CountRows(errorGallery.AllItems) >= 1 ,
Patch(Leads,Defaults(Leads),{LeadContactName: txtContactName.Text, LeadPhone: txtContactPhone.Text, LeadContactNotes: txtNotes.Text, LeadEntryDate: Date.SelectedDate, AgentEmail: vAgent.AgentEmail, crb4e_lead: Concatenate(txtContactEmail.Text, " -- " , Now())}),
CountRows(errorGallery.AllItems) >= 1, UpdateContext({varResubmit: true});
Set(vReset,true);Set(vReset,false);
UpdateContext({varResubmit: true})
);
varResubmit is a variable that if true, shows the buttons and data.
the first logical, if found true, patch data.
the second logical if found true (variable in button called varSubmit controls main button && count >=1), patch data
the third logical if found true, will only show the buttons and data for the user to decide what to do.
the third one is not working and I need help figuring out why. The app just sits and do nothing when I add the third one.