Main thing is if viewing the screenshot if we take the top struct item we have an array called selectedProviderIDs with integer values of 2,3, and 4. We also have an integer value (prc.rsSSOProviders.ssoProviderID) of 2. If I run arrayContains(selectedProviderIDs, prc.rsSSOProviders.ssoProviderID) I get false even though 2 should match the first value in the array. If I run arrayFind(selectedProviderIDs, prc.rsSSOProviders.ssoProviderID) I get 0
Any chance you can make a small repro in try.boxlang.io? It’s just a bit hard to grok with everything else. And you said, it has the same issue in Lucee?
This works here. Only difference is it’s a “fake” query and everything bx:script where as in actual app it’s bx:tag. I’ll see if I can do tag version in tryboxlang. Probably there’s a better way anyway but “ValueList” is not a valid function in Boxlang so I have kind of a verbose solution -
Doesn’t appear I can run tags in tryboxlang but two things: My actual code is pretty much identical to the tryboxlang code that works with the exception that it’s A) a query of a database and B) it’s mostly tag. Additionaly I haven’t tried ACF (I can though) but Lucee works fine as expected. I can make a test page that uses the exact same thing as tryboxlang code except tag and paste here if helps. Don’t think it’s going to run on tryboxlang though
just sent. Please let me know if doesn’t arrive. Thank you! I should have put br between the two sets but it’s 4 and then 4 of same thing done two ways, or so I think.
The issue is that in the first loop (by script) I get true then false which is correct. My array of providers in this case has a total of two values and one was selected. To determine whether “checked” should be set in the checkbox I compare the “selected” values against “all values”. In this case the user had previously selected provider #1 only so it shows as “true” (thus checked set for checkbox) whereas as provider #2 was not selected prior so shows false (not checked in checkbox). The 2nd loop should do the exact same thing except this time in tag loop but it does not. It returns false/false. That first item in the “loop by tag” should be true since the currentID is 1 and the “all providers” record ID is 1. The 2nd one should show false as before. The issue is they’re BOTH showing false which is incorrect.