Skip to main content
January 27, 2026
Question

regarding validations in excel

  • January 27, 2026
  • 2 replies
  • 0 views

No warning or error message is displayed when the user uploads a file containing duplicate advisor code and Line of business.

I need validation message when I am uploading more than 1 entry with same data. that is if the excel consists same line of business and advisor code then I need this validation message
a!forEach(
items: local!constructData,
expression: if(
count(
index(
fv!item[local!constructData.advisorCode],
wherecontains(
fv!item[local!constructData.lineOfBusiness],
tostring(local!constructData)
)
)
) > 1,
"Duplicate Line of business",
null
)
),

    2 replies

    harshas2775
    January 27, 2026

    Made few tweaks to your code. Try the below 

    a!forEach(
        items: local!constructData.lob,
        expression: if(
          count(
            index(
              local!constructData.advisorCode,
              wherecontains(
                fv!item,
                local!constructData.lob
              )
            )
          ) > 1,
          "Duplicate Line of business",
          ""
        )
      )

    Few notes : tostring(local!constructData) will cast your entire data into a single text and wherecontains() won't work appropriately. 

    mikes0011
    Brainy
    January 27, 2026