Allow ContainsValue to include Refs in value type

Currently ContainsValue works for standard values but not Refs.

ContainsValue(7, [1,2,3,7]) => true
ContainsValue(Ref(Collection("coll_name"), "306041453769966147"), [Ref(Collection("coll_name"), "306041453769966147")]) => false

I ran into a situation where it would be very useful to generate a count for how many times a Ref appeared in an array of values. But right now there is no way for me to be able to know if that Ref is contained in that array because no function can generate a boolean for this. ContainsValue is meant to solve this problem but doesn’t work on Refs. So if it could account for Refs, that would solve this problem.

That’s very odd. I cannot replicate it. How/where are you executing your example?

image

image

1 Like

Oh I found my mistake. The array was in a data object and i did not dive one level deeper to access it appropriately. Never-mind this.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.