Been banging my head against the wall here on this one, need me some Spock assistance
Iโve got an action, thatโs part of a Group of actions that should fire off on the table event action, but for some reason the action Iโm having problems with is not following the condition and instead being skipped.
App: TheNASAStudyApp-629466
Action: Alert | No Respondent Selected - part of โStack | Measure (tapped)โ
emulate as โmultiechvisions@gmail.comโ
When you tap an option you should get a warning about not having something selected (the respondent, from the second action in the stack), but instead Iโm getting an alert about consent (the third action in the stack).
Would appreciate if someone could take a look and see if itโs just some condition Iโve got mixed up, or if thereโs some bug with Grouped actions?
Thanks!
Solved! Go to Solution.
@Steve you were right that it was something to do with a technical thing.
isblank(any(Current_User[Current_Respondent]))
that worked. Wrapping the ANY() around the current user slice seems to have done the trick.
I remember Praveen explaining this problem once, something like:
โBecause thereโs a record for the Current_User[Whatever] slice, technically itโs not blank - even though there are no values in the field - the presence of the record is good enough for the non-specific ISNOTBLANK().โ
Youโre sure Current_User has only one row?
Yes. And Iโve checked that the column is indeed included in the sliceโs columns.
Iโve also got other actions that are now firing off when they shouldnโt be.
Part of the same stack:
Hereโs the condition:
And the formula controlling that column:
This field is blank (the ongoing interactions) so the warning for ongoing actions shouldnโt fire offโฆ yet it does.
Any difference?
select(
Ongoing_Interactions[InteractionID],
and(
index([_thisrow].[Current_PID_Ongoing_Visit], 1) = [Visit_Link],
or(
isblank([Current_Respondent]),
[_thisrow].[Current_Respondent] = [Interaction_Respondent]
)
)
)
Iโm thinking thereโs more going on, see my video from above.
Iโve hard coded a slice to be blank, yet the formula ISNOTBLANK(slice[Column]) is firing off.
PS:
No, I tried switching things around inside the SELECT() formula, no change in behavior.
I tried a true root of the core issue test:
I created a new slice, making it empty with a FALSE formula, then a new action that fires off with the new slice is NOT blank - and it didnโt fire.
So itโs something with my logic somewhereโฆ Ugh.
count(...) = 0
instead if isblank(...)
?
@Steve you were right that it was something to do with a technical thing.
isblank(any(Current_User[Current_Respondent]))
that worked. Wrapping the ANY() around the current user slice seems to have done the trick.
I remember Praveen explaining this problem once, something like:
โBecause thereโs a record for the Current_User[Whatever] slice, technically itโs not blank - even though there are no values in the field - the presence of the record is good enough for the non-specific ISNOTBLANK().โ
Thatโs really good to know!
User | Count |
---|---|
16 | |
10 | |
9 | |
8 | |
3 |