a!foreach is not working

Certified Associate Developer

i am trying loop through the each row in the excel but foreach is not working .

  Discussion posts and replies are publicly visible

Parents Reply
  • I think there's a couple of problems here:

    First, I don't think the data you pasted in from your process is correct. Usually if you have `values=Text` in your process data, this actually means {values: "Text"} in an expression.

    Second, even if you were indexing the correct data, I don't think your extract will give you what you want. I'd recommmend testing this on a single item to make sure it returns correctly. Here's my attempt to replicate your issue - notice that it actually returns "n-Working Day" which will never match the logic in your if() statement:

    Keep in mind that a!forEach() actually just applies your expression to a list - so if your expression doesn't work for a single item, it's guaranteed it won't work on a list.

Children