January 11, 201313 yr I have a layouts with several global fields, each of which has a SQL driven, calculated value list attached. It works fine but I wanted to reduce the number of fields in the table for clarity sake and I was wondering if there was a way to have a single global field with multiple repetitions then use a Case function that SELECTS the appropriate value list. The effect would be that, instead of having 5 globals with 5 corresponding c_Valist fields, I could have single global with multiple reps and a single c_Valist field. I've been able to achieve something like this in a portal where I can easily set out conditions for which value list to trigger. But I can't seem to figure out how to do this outside a portal with multiple repetitions of a single global field where the condition is the repetition number. I tried the following, which returned <no values defined>. Oh and the set up above works fine with the same relationships so I think I'm just screwing the pooch on the syntax of the repeating field. Any leads would be appreciated as always! Case( GetActiveField = global[1]; SELECT List1; GetActiveField = global[2]; SELECT List2 ) Case( global = GetRepetition(global; 1); SELECT List1; global = GetRepetition(global; 2); SELECT List2 )
January 11, 201313 yr Author Oh, and I should also mention that I can't get this to work whether using a global with multiple reps or just a plain global. It does work if I set the condition to something like, GetLayoutName, but the problem of course is that a condition like that triggers the same Value List regardless of which global rep I was selecting. It seems that using the GetActiveField would be the best option but for some reason it's not working whether it's a drop down or pop up. Next I'll probably try an OnObjectEnter script that fires a different $$variable depending on which global rep is selected but even if this works, it seems to be an awkward workaround...
Create an account or sign in to comment