Skip to main content
Participating Frequently
Mar 11, 2025 5:05 PM UTC
Question

adding a small condition Grid column label parameter?

adding if condition in the label parameter of grid column, if local!docids are not available then column should be blank and otherwise Uploaded documents.

Can you please help on this.

Thanks for your thoughts on this.

    5 replies

    venkatrea696188
    Inspiring
    Mar 11, 2025 6:14 PM UTC

    Hi [mention:1bf28746db314580b1a6e5d32121e4b3:e9ed411860ed4f2ba0265705b8793d05] ,

    It's a known behavior of is null or empty function it will gives false for empty array .We have many approaches for example try using length function like 

    if(length({array})<=0,"","Upload documents")

    Participating Frequently
    Mar 11, 2025 6:34 PM UTC

    Hi. To complement [mention:ba9672c2f5294cb98c0a2b8fb79cf967:e9ed411860ed4f2ba0265705b8793d05]  suggestion, if there's a case where the variable "local!docsIds" is not a list, the length() function will return an error. To solve it, use the following code:

      if(
        or(
          a!isNullOrEmpty(local!docs),
          length(local!docs) = 0
        ),
        "",
        "Uploaded Documents"
      )

    stefanhelzle0001
    Brainy
    Mar 11, 2025 6:59 PM UTC

    More on null checking in my blog post: appian.rocks/.../

    Participating Frequently
    Mar 12, 2025 6:11 AM UTC

    Thank you so much stefan, this post helped me to resolve the issue.

    Participating Frequently
    Mar 12, 2025 5:17 AM UTC

    Hi [mention:1bf28746db314580b1a6e5d32121e4b3:e9ed411860ed4f2ba0265705b8793d05] ,

    In addition to the previous answers, another possible solution is: