In a feature report, is it possible to use the value of a field from one repeat in the where clause of a second repeat? The two repeats are direct children of the parent record but are not nested with each other.
That is what I'm trying to do:
${#repeat1}
${#repeat2 | where:"field1inrepeat2=field1inrepeat1"}${field2inrepeat2}${/}
{$/}
I've tried a bunch of different variations for the where clause, such as where:"field1inrepeat2='"+repeat1.field1inrepeat1+"'" or where:"field1inrepeat2="repeat1.field1inrepeat1"
The goal is to pull a value from a different repeat if the date in the current repeat record matches it.
Any help would be appreciated! I've read through all of the documentation, videos, and a bunch of posts but I can't determine if this is possible or not.
Solved! Go to Solution.
The ${#repeat1} ${#repeat2}...${/}${/} only works if they are nested. You need to use $layers to independently call layers in your feature service.
Documentation for $layers is excellent, consisting of 1 entire sentence.
You might try combing the repeat and $layers into something like:
${#repeat2 | where:"fieldrepeat2= '" + ${$layers["repeat1name"] | where:"1=1" | outFields:"repeat1date"} + "'"}
and see what happens.
I'd test the $layers independently to get it working before you try passing it into something. I have found it to be very finicky to get anything working with it.
The ${#repeat1} ${#repeat2}...${/}${/} only works if they are nested. You need to use $layers to independently call layers in your feature service.
Documentation for $layers is excellent, consisting of 1 entire sentence.
You might try combing the repeat and $layers into something like:
${#repeat2 | where:"fieldrepeat2= '" + ${$layers["repeat1name"] | where:"1=1" | outFields:"repeat1date"} + "'"}
and see what happens.
I'd test the $layers independently to get it working before you try passing it into something. I have found it to be very finicky to get anything working with it.
Thanks @TylerGraham2! I briefly tried the method you outlined without success but I will look into it further. For now, I was able to use an if statement instead.