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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / An entry is required o...
Power Apps
Suggested Answer

An entry is required or has an invalid value. Please correct and try again.

(1) ShareShare
ReportReport
Posted on by 78
I am getting this Error while Submitting Form in Power Apps. Even when adding the value in field still getting this error.  
Anyone know how to resolve this issue.
 
this the whole formula : 
 
// For Appointment Type
If(
    varSelectedAdminTabNewAppType && varEditSelectedAppType,
    If(
        Not(
            IsBlank(
                LookUp(
                    'Appointment Type',
                    Title = txt_Input_Appointment_Type.Value
                )
            )
        ),
        Notify(
            "A Appointment Type  with this name already exists. Please use a different name.",
            NotificationType.Error
        ),
        If(
            IsBlank(txt_Input_Appointment_Type.Value),
            Set(
                varSubmissionValidation,
                true
            ),
            Set(
                varSubmissionValidation,
                false
            ),
            Patch(
                'Appointment Type',
                gal_All_Appointment_Type.Selected,
                {Title: txt_Input_Appointment_Type.Value}
            );
            ResetForm(frm_Add_Appointment_Type);
            Set(
                varSelectedAdminTabNewAppType,
                false
            );
            Notify(
                "Appointment Type Saved Sucessfully",
                NotificationType.Success
            );
        )
    ),
    If(
        Not(
            IsBlank(
                LookUp(
                    'Appointment Type',
                    Title = txt_Input_Appointment_Type.Value
                )
            )
        ),
        Notify(
            "A Appointment Type  with this name already exists. Please use a different name.",
            NotificationType.Error
        ),
        SubmitForm(frm_Add_Appointment_Type)
    )
);
// For Appointment Location
If(
    varSelectedAdminTabNewLocation && varEditSelectedLocation,
    If(
        Not(
            IsBlank(
                LookUp(
                    'Appointment Location',
                    Title = txt_Input_Location.Value
                )
            )
        ),
        Notify(
            "A location with this name already exists. Please use a different name.",
            NotificationType.Error
        ),
        If(
            IsBlank(txt_Input_Location.Value),
            Set(
                varSubmissionValidation,
                true
            ),
            Set(
                varSubmissionValidation,
                false
            );
            Patch(
                'Appointment Location',
                gal_All_Locations.Selected,
                {Title: txt_Input_Location.Value}
            );
            Notify(
                "Appointment Location Saved Sucessfully",
                NotificationType.Success
            );
            ResetForm(frm_Add_Location);
            Set(
                varSelectedAdminTabNewLocation,
                false
            );
        )
    );
    ,
    If(
        Not(
            IsBlank(
                LookUp(
                    'Appointment Location',
                    Title = txt_Input_Location.Value
                )
            )
        ),
        Notify(
            "A location with this name already exists. Please use a different name.",
            NotificationType.Error
        ),
        SubmitForm(frm_Add_Location)
    );
   
);
// For Users
If(
    varSelectedAdminTabNewUser && varEditSelectedUser,
    If(
        IsBlank(tog_Is_Admin.Checked) || IsBlank(drp_Appointment_Color.Selected) || IsBlank(drp_Users.Selected),
        IsBlank(DataCardValue3.Selected) ||IsBlank(DataCardValue2.Checked),
        Set(
            varSubmissionValidation,
            true
        ),
        Set(
            varSubmissionValidation,
            false
        );
        Patch(
            Users,
            gal_All_Users.Selected,
            {
                'User': {
                    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                    Claims: "i:0#.f|membership|" & Lower(drp_Users.Selected.Mail),
                    Email: drp_Users.Selected.Mail,
                    Department: drp_Users.Selected.Department,
                    DisplayName: drp_Users.Selected.DisplayName,
                    JobTitle: drp_Users.Selected.JobTitle,
                    Picture: ""
                },
                'User Name': drp_Users.Selected.DisplayName,
                'User Email': drp_Users.Selected.Mail,
                IsAdmin: tog_Is_Admin.Checked,
                IsActive: DataCardValue2.Checked,
                'Appointment Color': drp_Appointment_Color.Selected.'Color Value',
                'UserRole (UserRole0)': {
            Id: LookUp('User Role', Title = DataCardValue3.Selected.Value, ID),
            Value: DataCardValue3.Selected.Value
        }
            }
        );
        Patch(
            'Appointment Colors',
            LookUp(
                'Appointment Colors',
                'Color Value' = drp_Appointment_Color.Selected.'Color Value'
            ),
            {IsActive: true}
        );
        ResetForm(frm_Add_New_User);
        Refresh(Users);
        Set(
            varSelectedAdminTabNewUser,
            false
        );
        Notify(
            "User Details Updated Sucessfully",
            NotificationType.Success
        );
    ),
    If(
        IsBlank(drp_Users.Selected) || IsBlank(tog_Is_Admin.Checked) || IsBlank(drp_Appointment_Color.Selected) || IsBlank(DataCardValue2.Checked),
        Set(
            varSubmissionValidation,
            true
        ),
        If(
            Not(
                IsBlank(
                    LookUp(
                        Users,
                        //'User Email' = drp_User.SelectedItems.
                        'User'.Email = drp_Users.Selected.Mail
                    )
                )
            ),
            Notify(
                "A User with this Email already exists. Please use a different Email.",
                NotificationType.Error
            ),
            Set(
                varSubmissionValidation,
                false
            );
            // Else case for adding a new user without editing an existing one
Patch(
                Users,
                Defaults(Users),
                {
                    'User': {
                        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                        Claims: "i:0#.f|membership|" & Lower(drp_Users.Selected.Mail),
                        Email: drp_Users.Selected.Mail,
                        Department: drp_Users.Selected.Department,
                        DisplayName: drp_Users.Selected.DisplayName,
                        JobTitle: drp_Users.Selected.JobTitle,
                        Picture: ""
                    },
                    'User Name': drp_Users.Selected.DisplayName,
                    'User Email': drp_Users.Selected.Mail,
                    IsAdmin: tog_Is_Admin.Checked,
                    IsActive: DataCardValue2.Checked,
                    'Appointment Color': drp_Appointment_Color.Selected.'Color Value',
                    /*'User Role': {Value: drp_User_Role.Selected.Title}*/
                    'UserRole (UserRole0)': {
            Id: LookUp('User Role', Title = DataCardValue3.Selected.Value, ID),
            Value: DataCardValue3.Selected.Value
        }
                }
            );
            Patch(
                'Appointment Colors',
                LookUp(
                    'Appointment Colors',
                    'Color Value' = drp_Appointment_Color.Selected.'Color Value'
                ),
                {IsActive: true}
            );
            ResetForm(frm_Add_New_User);
            Notify(
                "New User Added Sucessfully",
                NotificationType.Success;
                Refresh(Users);
                Set(
                    varSelectedAdminTabNewUser,
                    false
                );
            );
        );
    )
);
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
     
    Somethings that would help
     
    1. Is the Dataverse / SharePoint?
    2. What exact columns are marked as Required on the List/Table
    3. Please share pictures of your Form all populated, feel free to half block stuff out, but show so we understand what you see
    4. Verify that your controls Update method/property are setup correctly for all of them being submitted on the form
    5. Save, close the app, clear your cache and come back. I would do this or do it on another browser instance, even in Incognito/Provide mode
    6. Make sure that any required fields are on the forms and not accidentally removed (compare this to #2 question) Add back any that need to be there
    7. Verify the mode, is this EDIT or NEW? If its EDIT, is the ID/GUID (for SharePoint/Dataverse) there???
     
    It would be interesting if none of that helps and you swear you don't know why and we cannot figure it out, but to purposely write a Patch Function in a Button. Manually do this but grab the values from your Screen. See if you see an error.
     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard