1

I am using a lookup column in a library that is formatting the number to look like this:

Days Open lookup column on library

On the list column it's pulling from, the data looks like this (which is the desired result):

Days Open column on list

Is there a formatting schema I can use to make the lookup column look like the original Days Open column?

For additional info, here's how the Days Open column is set up:

Days Open column information

0

1 Answer 1

0

Use below JSON code to format your lookup column:

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "=floor(@currentField.lookupValue)"
}

Output:

enter image description here


You can use either floor() or ceiling() operator as per your requirements. Check below documentation for more information about operators available in JSON formatting:

JSON formatting Operators

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.