Forum Discussion
SharePoint List calculated column formula using a Lookup column reference
jasenpeters Great work, I am glad that you figured it out using JSON formatting.
Is it working as expected for you or do you need any further help with the JSON formatting?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
List1 have columns like User ID,UserName, Task,E-Mail, Zone
List2 have columns EMail, Zone
Zone for list1 i am getting from List2 setting it as lookup column and Mapping it with E-Mail column.
Now in List1 both E-Mail and Zone showing as lookup. i want to created another column say it UniqueID as calculated column Zone_User ID. Can you please help me here doing this by JSON.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent":"="[$Zone.lookupvalue]+"-"+[$User ID]"
}
I tried it but its not working.
- ganeshsanapDec 11, 2022MVP
ramyasahu Try JSON like below in column formatting option for your Zone_UserID column:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent":"=[$Zone.lookupValue]+'-'+[$UserID]" }Make sure you are using correct internal name of your zone and user id columns. Follow this article to find the internal name of your SharePoint column: How to find the Internal name of columns in SharePoint Online?
Please consider giving a Like if my post helped you in any way.