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

I'm getting an error while I'm doing a patch the error is: DispName: The specified column is generated by the server and cant be specified

Hi,

 

i was checking my app's patch system this morning and I found it was giving me this error: DispName: The specified column is generated by the server and cant be specified. and i dont know how to fix it anyway this is the code i have: 

 

Patch(Visits, Defaults( Visits ), {
    DSA_x002d_code: scannerRes,
    Title: LookUp(database, 'DSA-code' = scannerRes).Name,
    'Location: Name': location.Selected.Value,
    'Date/Time': Now(),
    Level: LookUp(database, 'DSA-code' = scannerRes, level),
    'signIn/signOut': "Signed In"
});

 

and this is the SharePoint list I have been patching to:

Harrison_Ellem_0-1632355302859.png

so if anybody could help me thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

I ended up having to redo the SharePoint list and and keep the field called "Title" since it wouldn't let me re-add it.

View solution in original post

6 REPLIES 6
StalinPonnusamy
Super User
Super User

Hi @Harrison_Ellem 

 

Looks like Location is a lookup field. So First try without Location lookup to find the error

Patch(Visits, Defaults( Visits ), {
    DSA_x002d_code: scannerRes,
    Title: LookUp(database, 'DSA-code' = scannerRes).Name,
    'Date/Time': Now(),
    Level: LookUp(database, 'DSA-code' = scannerRes, level),
    'signIn/signOut': "Signed In"
});

 

And If Location is lookup field then try this

Patch(Visits, Defaults( Visits ), {
    DSA_x002d_code: scannerRes,
    Title: LookUp(database, 'DSA-code' = scannerRes).Name,
    'Location': {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
            Id: location.Selected.Id,
            Value: location.Selected.Value
        },
    'Date/Time': Now(),
    Level: LookUp(database, 'DSA-code' = scannerRes, level),
    'signIn/signOut': "Signed In"
});

 

If this not works then Please let us know the field types to helo troubleshoot further

the column types are:

DSA-code = single line of text

Name/Title = single line of text

Location = location

Date/Time = date

level = choice

signIn/signOut = single line of text

location: name = sharepoint wont let me see what type of column but it not a lookup column

StalinPonnusamy
Super User
Super User

Hi @Harrison_Ellem 

 

We need to try one by one. Try this without Location

With({_item:LookUp(database, 'DSA-code' = scannerRes)},
Patch(Visits, Defaults(Visits), {
    DSA_x002d_code: scannerRes,
    Title: _item.Name,
    'Date/Time': Now(),
    Level: {Value : _item.level},
    'signIn/signOut': "Signed In"
}));

 Let me know this works or not

this gives me the error of Title: the field 'Tittle' is required

StalinPonnusamy
Super User
Super User

Looks like no DSA Code for the "scannerRes" that you are looking for. What's your expectation if the DSA code does not exists in the database.?

 

In this case, the Title will be DSA code. If DSA code is not found then scannerRes by using Coalesce(_item.Name,scannerRes)

 

With({_item:LookUp(database, 'DSA-code' = scannerRes)},
Patch(Visits, Defaults(Visits), {
    DSA_x002d_code: scannerRes,
    Title: Coalesce(_item.Name,scannerRes),
    'Date/Time': Now(),
    Level: {Value : _item.level},
    'signIn/signOut': "Signed In"
}));

 

I ended up having to redo the SharePoint list and and keep the field called "Title" since it wouldn't let me re-add it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,060)