App not following branching rules in a bot

Hopefully this is not another terminal Bot bug...

So I've created a simple Bot to send an email with a PDF attachment.  It triggers off a schedule, looks at slice data, works on each row and ignores security filters.  The client wants it so that it sends a different attachment depending on if the site is in Wales or not (I'm UK based).  So in the Bot I created a "Branch on condition" rule of:

OR(
LEFT([Postcode],2)="CF",
LEFT([Postcode],2)="LD",
LEFT([Postcode],2)="LL",
LEFT([Postcode],2)="NP",
LEFT([Postcode],2)="SA",
LEFT([Postcode],4)="SY16",
LEFT([Postcode],4)="SY17",
LEFT([Postcode],4)="SY18",
LEFT([Postcode],4)="SY19",
LEFT([Postcode],4)="SY20",
LEFT([Postcode],4)="SY23",
LEFT([Postcode],4)="SY24",
LEFT([Postcode],4)="SY25",
AND(
OR(
LEFT([Postcode],3)="CH5",
LEFT([Postcode],3)="CH6",
LEFT([Postcode],3)="CH7",
LEFT([Postcode],3)="CH8"
),
NOT(OR(
LEFT([Postcode],4)="CH61",
LEFT([Postcode],4)="CH62",
LEFT([Postcode],4)="CH63",
LEFT([Postcode],4)="CH64",
LEFT([Postcode],4)="CH65",
LEFT([Postcode],4)="CH66",
LEFT([Postcode],4)="CH88",
LEFT([Postcode],4)="CH89"
))
)
)

Weird thing is, it always branched TRUE even when the [Postcode] does not match e.g. "BS405EL".  So I took the above formula and put it into a virtual column called [Is Wales], as a sort of santity check.  Sure enough a few are showing in the virtual column as FALSE even though the Branch condition is sending then down the TRUE branch.

So I assume it's maybe something with the Bot.  So I put the above formula into the template file of the email body.  This shows in the email body as an despite it adding the PDF template for TRUE.  I even break the above formula into its 3 main sections to check each one, all are correct in the email body

To try and force it down the FALSE branch I wrap the entire Branch formula in NOT().  All this suceeds in doing is now all emails are showing the FALSE template.  Well at least that template works...

But when I removed the Not() everything is still going down the FALSE Branch!!!!  So it's almost like the Branch condition is somehow locked onto whatever the last result is.  Not() can switch this but seemingly nothing else!

Wondering if its the N bit which should show TRUE I do this in the Branch condition:

IF(
...Branch Formula...,
TRUE,
FALSE

This changes nothing...

Changed Branch formula to use the virtual column [Is Wales], no change...

Finally tried

[Postcode]="BS405EL"

Nope, everything still goes down the FALSE branch....

Think this maybe related to @Joseph_Seddik post https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Automation-critical-problem-and-workaround-Bots...

Copying in @devingu @Roderick @zito from the above post in case this is related.  Text in red highlights the stangest part which might give you a steer.

Just off to create a second bot to avoid having to use the branch.  I'll report back shortly...

Simon, 1minManager.com

1 18 371
18 REPLIES 18
Top Labels in this Space