Forum Discussion

bryanfrumkin220's avatar
bryanfrumkin220
Copper Contributor
Mar 28, 2025

SharePoint Form Conditional Formatting

Hello Community!

I am working to make a Lookup column only display if the value isn't null

The new lookup column is $RealtyGroupInformation 

The original column (that's being pulled) is titled $Code_x003a__x0020_Name


Shouldn't this following code work:
=if(substring([$Code_x003a__x0020_Name], indexOf([$Code_x003a__x0020_Name], ';#') + 2, len([$Code_x003a__x0020_Name])) != '', true, false)

The following code hides the column no matter if the value is/isn't null

Microsoft doesn't list any issues with multi-value lookup columns

 

Any help would be great. 

6 Replies

  • bryanfrumkin220's avatar
    bryanfrumkin220
    Copper Contributor

    Has anyone found a workaround for Multi-choice lookup columns
    I want to be able to not display them on my form if they don't have an option!

  • michalkornet's avatar
    michalkornet
    Iron Contributor

    Hi bryanfrumkin220  I have checked your case, and it looks like there is no information about the additional field of the lookup column in the form context. Maybe you can compare a value of the default lookup column property? 

    Maybe you can compare an value of the default lookup column property? 

     

    • bryanfrumkin220's avatar
      bryanfrumkin220
      Copper Contributor

      Hi Michael, the content from the lookup column is coming from this column $Code_x003a__x0020_Name



      I am just looking to hide this column when $Code_x003a__x0020_Name is null; moreover, when $RealtyGroupInformation is null

      The column $Code_x003a__x0020_Name is a Calculated column, by the way.

      What formula do you think i could use for my case?

      I also compared it against a value and it still isn't working properly
      =if(substring([$Code_x003a__x0020_Name], indexOf([$Code_x003a__x0020_Name], ';#') + 2, 1000) == 'All: BHHS - Alliance', 'true', 'false')
      I had the lookup value as All: BHHS - Alliance from Code:Name, and it is still not displaying

      • michalkornet's avatar
        michalkornet
        Iron Contributor

        bryanfrumkin220  Ok, I get it. I tested a case similar to yours, and it looks like the multi-valued lookup field is not working. The value used in the formula should be $RealtyGroupInformation, but as you already know, when the lookup is multi-valued, there is no possibility to save the formula. In the console, I can see a message stating that the field type is not supported. 

        When I change the lookup setting to be a single valued, then the code works

        =if(substring([$RealityGroupResources],indexOf([$RealityGroupResources],';#')+2,1000) == 'All', 'true', 'false')

         

         

    • bryanfrumkin220's avatar
      bryanfrumkin220
      Copper Contributor

      Hi Michael, the content from the lookup column is coming from this column $Code_x003a__x0020_Name



      I am just looking to hide this column when $Code_x003a__x0020_Name is null; moreover, when $RealtyGroupInformation is null

      The column $Code_x003a__x0020_Name is a Calculated column, by the way.

      What formula do you think i could use for my case?

Resources