Apr 05 2022 01:06 PM - edited Apr 05 2022 01:13 PM
Hello, i have this code running on a button click. For some reason the ClearCollect works fine, and i can access the returned data from MyApi, but the UpdateContext does not work. If i run the UpdateContext outside the Switch() function it works, but not inside.
Any clues?
UpdateContext({results:""})
Switch(
var,
"colGetUser",ClearCollect(colResults,MyAPI.GetUser(user)), <-- This work's fine
"ctxGetUser",UpdateContext({ctxResults: MyAPI.GetUser(user)}), <-- This doesn't work
false
);
//UpdateContext({ctxResults: MyAPI.GetUser(user)} <-- This works fine
Apr 05 2022 02:57 PM
Here's some more interesting behavior. When i have a single ContextUpdate action inside a Switch function everything works fine, but when i have more than 1 ContextUpdate none of them work..