cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramole
Super User
Super User

Form Error Field required

Hello everyone,

 

Iam stuck on Field required because i have a Toggle and when is true i use a patch to send the data to SharePoint or else will use normal submit form , here is my problem is when using patch function I add at end Form.Updates when i try to patch error Field required check number on the form Check Number field, or i had to remove the patch this Form.Updates then it will patch without error, so my question is i want to ignore the check number field on the form when toggle is true and patching as i have another check number field on the gallery collection as you can see screenshot

 

 

Submit(Form)

CaptureForm.PNG

 

 

Patch 

Capture.PNG

 

Patch Formula I am using 

 

UpdateContext({
    LoadingCal:
    true
});
If(
    !IsBlank(Trim(txtinpBusinessName.Text)) || !IsBlank(cmbTypeCheckGal.Selected) || !IsBlank(txtinpInvoiceNumber) || !IsBlank(cmbStatusCheck.Selected) || !IsBlank(Trim(txtinpCheckNumberGal_2.Text)) || !IsBlank(txtinpCheckAmountGal_2.Text) || !IsBlank(datepkCheckDueDateGal_2.SelectedDate),
   // Set(
      //  varLoanChecks,
        ForAll(
            galMetadata_1.AllItems,
            Patch(
                'Ramole Check Management',
                Defaults('Ramole Check Management'),
                {
                    'Business Name': txtinpBusinessName.Text,
                    'Type of Check': cmbTypeCheckGal.Selected,
                    'Invoice Number': txtinpInvoiceNumber.Text,
                    'Date due': datepkCheckDueDateGal_2.SelectedDate,
                    'Check Number':txtinpCheckNumberGal_2.Text,
                    amount: Value(txtinpCheckAmountGal_2.Text),
                    Status: cmbStatusCheck.Selected,
                    note: txtinpCheckNotesGal_2.Text
                },
               formContent_1.Updates
            )
        )

 

 

 

 

 

 

 

 

Thanks   

 

 

 

 

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.
1 ACCEPTED SOLUTION

Accepted Solutions
Ramole
Super User
Super User

Hi

All good to go I have now used plan B which is to add another form and remove the check number field from the second form and it works now.

The reason I wanted to use the form is I need to add attachments photos using collection adds for me on Attachment control and sends off to data source with record. 

 

 

Capturefixed.PNG

 

 

Thank you 

 

 

 

 

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

View solution in original post

1 REPLY 1
Ramole
Super User
Super User

Hi

All good to go I have now used plan B which is to add another form and remove the check number field from the second form and it works now.

The reason I wanted to use the form is I need to add attachments photos using collection adds for me on Attachment control and sends off to data source with record. 

 

 

Capturefixed.PNG

 

 

Thank you 

 

 

 

 

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,423)