cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

New v Edit Mode

I have a Power App that works perfectly for what I need it to do while creating a new item on my SharePoint list.  However, I've run into a snag if there is a need to edit any of the information in the form.  The fields with issues are School, Vender Name, and Purchase Order Number.

 

In Sharepoint Purchase Order Number, School, and Vendor Name are all Single Line of Text

 

School_DataCard2 has two inputs:

School (ComboBox1 - Visible is set to SharePointForm1.Mode = FormMode.New)

Items SortByColumns(Distinct('FPC-Purchase Orders'.School,School),"Result")

School (TextInput1 - Visible is set to !(SharePointForm1.Mode = FormMode.New))

Default ThisItem.School

 

Vendor Name_DataCard2 has two inputs:

Vendor Name (ComboBox2 - Visible is set to SharePointForm1.Mode = FormMode.New)

Items SortByColumns(Distinct(Filter('FPC-Purchase Orders',School = ComboBox1.Selected.Result),'Vendor Name'),"Result")

Vendor Name (TextInput2 - Visible is set to !(SharePointForm1.Mode = FormMode.New))

Default ThisItem.'Vendor Name'

 

Purcahse Order Number_DataCard1 has two inputs:

Purchase Order Number (TextInput3 - Visible is set to !(SharePointForm1.Mode = FormMode.New))

Default ThisItem.'Purchase Order Number'

Purchase Order Number (DataCardValue6 - Visible is set to SharePointForm1.Mode = FormMode.New)

Items TheVar (which is set from selecting the item in the gallery)  This variable works correctly when creating an item.

 

Here is my gallery Items control:

Items Filter('FPC-Purchase Orders',School = ComboBox1.Selected.Result And 'Vendor Name' = ComboBox2.Selected.Result)

 

OnSelect in my Gallery

Set(TheVar,ThisItem.'PO Number') And UpdateContext({TheVar2: ThisItem.'Project Name:Funding Source Lookup'.Value}) And UpdateContext({TheVar3: ThisItem.'Project Name'.Value})

 

Everything works perfectly for creating a new item.  When I edit an item, the text of the item appears in the text boxes, but upon saving, each of these text boxes comes up with the error "An Entry is required or has an invalid value.  Please correct and try again.

 

One thing to note is that a flow on the FPC-Purchase Orders will copy the item to an archive and delete the item from the list if the invoice amount matches the Purchase Order Amount.  This is most often the case, and the Purchase Order gets archived.  So, the items that are selected for School, Vendor Name, and Purchase Order Number during creation of the item are usually not there upon editing.

 

Help would be appreciated!

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi @cmegow ,

 

Could you please share more details about your scenario? Are you working with SharePoint List Customize Form? How did you submit the form, using SubmitForm or Patch? Have you modified the Update properties of those data cards?

 

As per the issue you mentioned, and refer to posts which saying the same issue:

https://powerusers.microsoft.com/t5/Building-Power-Apps/An-entry-is-required-or-has-an-invalid-value...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Getting-quot-An-entry-is-required-or-has-an-...

 

please:

1\ Firstly, check if there is any required columns in that list, if there be, please set it to Not Required, or if it is truly required, you will need to add that field into the form.

 

2\ If columns set up correctly but issue persists, please consider use Patch function to submit the form.

 

3\ As I could see, you are using 1 form for both new mode and edit mode. This would make the form too complicated in displaying fields' values and updating with Data Card's Update property values while you are using SubmitForm to submit. As a solution to simplify Form's setup, we could duplicate the Form and separate with different form modes, please refer to this blog to know the steps, quite easy:

https://powerapps.microsoft.com/fr-fr/blog/separate-custom-forms/

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

View solution in original post

2 REPLIES 2
Microsoft
Microsoft

Hi @cmegow ,

 

Could you please share more details about your scenario? Are you working with SharePoint List Customize Form? How did you submit the form, using SubmitForm or Patch? Have you modified the Update properties of those data cards?

 

As per the issue you mentioned, and refer to posts which saying the same issue:

https://powerusers.microsoft.com/t5/Building-Power-Apps/An-entry-is-required-or-has-an-invalid-value...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Getting-quot-An-entry-is-required-or-has-an-...

 

please:

1\ Firstly, check if there is any required columns in that list, if there be, please set it to Not Required, or if it is truly required, you will need to add that field into the form.

 

2\ If columns set up correctly but issue persists, please consider use Patch function to submit the form.

 

3\ As I could see, you are using 1 form for both new mode and edit mode. This would make the form too complicated in displaying fields' values and updating with Data Card's Update property values while you are using SubmitForm to submit. As a solution to simplify Form's setup, we could duplicate the Form and separate with different form modes, please refer to this blog to know the steps, quite easy:

https://powerapps.microsoft.com/fr-fr/blog/separate-custom-forms/

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

View solution in original post

@v-jefferni I feel silly.  I was able to get it fixed.  The columns were set to not required in SP, but they were still listed as required in the form.  I changed True to False for each data card and now it works just fine.  I did add labels back in with the star to make it visually look like the field is required.  But, it's working now.  Thanks for the guidance. 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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