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 / An entry is required o...
Power Apps
Unanswered

An entry is required or has an invalid value

(0) ShareShare
ReportReport
Posted on by 215

Hello experts,

 

I am building an app for visitor request automation. I see the submit form doesn't have an issue updating the form inputs in SharePoint. I tested it by just using a submitform code in a sample button.

In my code, when I commented the below, the error message did not show up. So I strongly believe there is something wrong in the below code which is bringing up the "An entry is required or has an invalid value" error message. 

 

UpdateIf(VisitorRequestList,PD_Visit_Required="true" And 'Approval List Gallery_1'.Selected.UniqueID=UniqueID And User().Email = ApprovalForm_1.LastSubmit.'PD Manager'.Email, {PD_Manager_Approval:"Approved"});
UpdateIf(VisitorRequestList,VE_Visit_Required="true" And 'Approval List Gallery_1'.Selected.UniqueID=UniqueID And User().Email = ApprovalForm_1.LastSubmit.'VER Manager'.Email, {VE_Manager_Approval:"Approved"});
UpdateIf(VisitorRequestList,CA_Visit_Required="true" And 'Approval List Gallery_1'.Selected.UniqueID=UniqueID And User().Email = ApprovalForm_1.LastSubmit.'CA Manager'.Email, {CA_Manager_Approval:"Approved"});

 

The Title field in the SharePoint list is "Required" and it is a Required field in the form as well. There is always data in this field. No other fields are mandatory in the form or the list.

I double checked if there are any hidden fields that are marked as "Required". Except the Title, none of the fields mandatory. Not sure what I am missing here. Struggling to fix this error for quite a long time. Your help is much appreciated.

 

PowerUser19_0-1712285781416.png

 

PowerUser19_1-1712285824394.png

PowerUser19_2-1712286017349.png

 

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @PowerUser19 

    For each of your UpdateIf statements, include the Title filed data as well. i think this maybe your issue?

     

    eg

    UpdateIf(
     VisitorRequestList,
     PD_Visit_Required="true" And 'Approval List Gallery_1'.Selected.UniqueID=UniqueID And 
     User().Email = ApprovalForm_1.LastSubmit.'PD Manager'.Email,
     {
     Title: yourDataCardTitleFieldName,
     PD_Manager_Approval:"Approved"
     }
    );

     

    Usually, an editing to a data source where you have REQUIRED fields needs to include those required fields as part of the updated record - doesn't matter if they have changed or not, they must be there.

  • PowerUser19 Profile Picture
    215 on at

    Hi @EddieE ,

    Thanks so much four response. Tried it but didn't work. Getting the same error.

    UpdateIf(VisitorRequestList,CA_Visit_Required="true" And 'Approval List Gallery_1'.Selected.UniqueID=UniqueID And User().Email = ApprovalForm_1.LastSubmit.'CA Manager'.Email, {Title:'Approval List Gallery_1'.Selected.Title,CA_Manager_Approval:"Approved"});

  • EddieE Profile Picture
    4,641 Moderator on at

    @PowerUser19 

    Did you adjust all 3 UpdateIf() statements, or just this one?

  • PowerUser19 Profile Picture
    215 on at

    @EddieE  I adjusted all 3. 

  • EddieE Profile Picture
    4,641 Moderator on at

    @PowerUser19 

    I suspect your condition inside the UpdateIf's isn't working correctly ie not return a true of false. I'd test each condition individually to test this idea, eg

    // I cannot see a field called PD_Visit_Required in your list of columns
    // If this is a field in your list, what data type is it? You are using type TEXT but if 
    // it's a Boolean then the below won't work
    PD_Visit_Required="true"

    and

    // The below may need to be switched around?
    'Approval List Gallery_1'.Selected.UniqueID=UniqueID
    
    // ie, reference your data source column name first
    UniqueID = 'Approval List Gallery_1'.Selected.UniqueID

     

    Try these things and see how you go.

  • PowerUser19 Profile Picture
    215 on at

    Hi @EddieE ,

     

    Thanks so much for your response. I got the fields hidden in the form. Also it is a text field and not Boolean. I will try the above suggestion to change the source reference now.

    I was wondering why the C&A Visit Required field is showing as the custom card and other 2 showing as normal data cards?

    PowerUser19_0-1712354598515.png

     

  • PowerUser19 Profile Picture
    215 on at

    Hi @EddieE ,

     

    I made the source reference change. Didn't help yet. But all the functions are working as it should on Approval. Is there a way to capture this error message and not show it on Approval? Even if I could hide the error message that pops up while approving, that should be good.

     

     

    PowerUser19_1-1712355607177.png

     

    I also made sure the visit required fields are not empty.

    PowerUser19_3-1712356162919.png

     

     

  • Verified answer
    EddieE Profile Picture
    4,641 Moderator on at

    @PowerUser19 

    The Custom card maybe the issue. Custom cards are ones that don't come across when the form is built by powerapps and are ones that you create manually - although, this card does appear to have been created by powerapps?? 

     

    You could try deleting it then re-adding it back in to see if that fixes the issue?

  • PowerUser19 Profile Picture
    215 on at

    @EddieE  It is created by PowerApps. All the forms in the field are created by adding the fields from SharePoint.  I noticed lot of other fields are showing as custom card too

    PowerUser19_0-1712357684276.png

    I will try to remove and add the C&A Data card back. There are bunch of references, I will first make a note of those before I remove the field and try to add it back in. 

  • PowerUser19 Profile Picture
    215 on at

    @EddieE Removing and adding the field back didn't help. But I did one more testing to confirm if it is only the C&A field which is giving the issue and Yes it is.

    When I commented the C&A item in the below code, I got through without any error message. I believe there is some issue with the C&A field setup in SharePoint or the PowerApps data card or somewhere else related to this field.

     

    UpdateIf(VisitorRequestList,PD_Visit_Required="true" And UniqueID='Approval List Gallery_1'.Selected.UniqueID And User().Email = ApprovalForm_1.LastSubmit.'PD Manager'.Email, {Title:'Approval List Gallery_1'.Selected.Title,PD_Manager_Approval:"Approved"});
    UpdateIf(VisitorRequestList,VE_Visit_Required="true" And UniqueID='Approval List Gallery_1'.Selected.UniqueID And User().Email = ApprovalForm_1.LastSubmit.'VER Manager'.Email,{Title:'Approval List Gallery_1'.Selected.Title,VE_Manager_Approval:"Approved"});
    //UpdateIf(VisitorRequestList,CA_Visit_Required="true" And UniqueID='Approval List Gallery_1'.Selected.UniqueID And User().Email = ApprovalForm_1.LastSubmit.'CA Manager'.Email, {Title:'Approval List Gallery_1'.Selected.Title,CA_Manager_Approval:"Approved"});

     

    PowerUser19_0-1712363354004.png

     

    PowerUser19_2-1712363681295.png

     

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard