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:
so if anybody could help me thank you in advance.
Solved! Go to Solution.
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.
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
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
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.
User | Count |
---|---|
170 | |
95 | |
76 | |
72 | |
59 |
User | Count |
---|---|
215 | |
166 | |
97 | |
95 | |
74 |