Skip to main content

5 replies

davidj137213
Brainy
Mar 24, 2024 11:32 PM UTC

Use this, where lower and uppper are the limits of the range you want to work with.

a!localVariables(
  local!lower: enumerate(ri!lower) + 1,
  local!upper: enumerate(ri!upper) + 1,
  local!value: remove(local!upper, wherecontains(local!lower, local!upper)),
  

  local!count: a!forEach(
    items: local!value,
    expression: sum(mod(fv!item, enumerate(fv!item) + 1) = 0) <= 2
  ),
 
  index(local!value, wherecontains(true, local!count))
  
)

New Participant
Mar 27, 2024 7:34 PM UTC

not working 

mikes0011
Brainy
Mar 27, 2024 7:59 PM UTC

I just tried the sample code posted and it works fine for me.  What are you trying, exactly, and what result are you getting, to make you think it isn't working?

The Expression Guru