web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SubmitForm gives error...
Power Apps
Answered

SubmitForm gives error: 'Value must be provided' using CDS while not required

(0) ShareShare
ReportReport
Posted on by 102

Hi,

 

I want to update a form by removing a field which is not required, but I get the error 'The requested operation is not valid. Server reponse: a value must be provided for item.'

 

How is this possible? You can find the settings in the pictures attached.

Would very nice if someone can help me.

 

KrValue must be provided_error.PNGDataCard properties current client.PNGDatacardValue properties current client.PNG

 

 

I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @ThomasVDS ,

    Could you please share a bit more about your issue?

    How do you remove the "Not required" filed from your Edit form? Directly from Edit form or disable the corresponding Data card within the Fields panel?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. If you want to remove a filed from your Edit form, please make sure thay you remove the Field from the Fields panel as below:4.JPG

    rather than remove the field from your Edit form directly.

     

    In addition, please consider use Patch function to submit your form data instead of SubmitForm function. The standard formula of Patch function as below:

    If(
     EditForm1.Mode = FormMode.New, /* <-- EditForm1 represents the Edit form in your app */
     Patch(
     'YourEntity',
     Defaults('YourEntity'),
     {
     Active: ActiveComboBox.Selected.Value,
     'Career Track': CareerTrackComboBox.Selected.Value,
     ...
     }
     ),
     Patch(
     'YourEntity',
     BrowseGallery1.Selected,
     {
     Active: ActiveComboBox.Selected.Value,
     'Career Track': CareerTrackComboBox.Selected.Value,
     ...
     }
     )
    )

    More details about Patch fucntion, please check the following article:

    Patch function

     

    Also please consider re-create a new app based on your CDS Entity, try above solutions I priovided, check if the issue is fixed.

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • ThomasVDS Profile Picture
    102 on at

    @v-xida-msft 

    Thank you for your response.

     

    I need to correct myself. I don't want to remove field. I just want to empty the field (remove the value).

    The 'current client' field is not mandatory.

    I don't get any error when this field is empty and update another field -> it works

    But when the field contains a value and I want to remove the value -> error

     

    I will give the Patch funtion a try. 🙂

     

    Kr

  • v-xida-msft Profile Picture
    on at

    Hi @ThomasVDS ,

    Could you please share a bit more about the "Current Client" column in your CDS Entity? Is it a LookUp column or a Option Set Type column?

    Have you taken a try with the Patch function I provided above?

    Further, do you want to clear value within the "Current Client" field in your Edit form?

     

    Actually, it is an known issue with Edit form in PowerApps. Within Edit form, we could not clear value within a LookUp field, Choice field, ... which has already been filled with values.

    Please check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/Clear-DateField-and-Lookup-Column-value/m-p/136709

     

    If the "Current Client" column is a Option Set type column in your CDS Entity, please consider use the following Patch function to clear the "Current Client" column value:

     

    Patch(
     'YourCDSEntity',
     BrowseGallery1.Selected,
     {
     'Current Client': {
     Value: Blank()
     }
     }
    )

    Or

     

     

    Patch(
     'YourCDSEntity',
     BrowseGallery1.Selected,
     {
     'Current Client': {
     Id: -1,
     Value: Blank()
     }
     }
    )

     

     

    If the "Current Client" column is a LookUp type column in your CDS Entity, please modify above formula as below:

    Patch(
     'YourCDSEntity',
     BrowseGallery1.Selected,
     {
     'Current Client': LookUp(Consultants, Consultants = GUID("")) /* <-- set a blank record to the 'Current Client' field */
     }
    )

    Note: The Consultants represents the Unique Identifier in your Consultants Entity.

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Verified answer
    ThomasVDS Profile Picture
    102 on at

    @v-xida-msftI have found the solution in the last reply in the tread you added.

     

    I enabled "Formula level error management" in the advanced settings of my app.

    https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-databases/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard