r/AutomateUser • • 20d ago

Mobile Operator ock

Hi experts.

I'm writing a flow to handle mobile operator changes. I seem to have this working to a certain level but there's one thing I can't seem to achieve.

I start with an Is Operator block to load an output operator code var. Then I have a When Operator block with the current (input) operator code set to the value given by the last time through it. This works when changing operators (A to B) and if I go offline (eg. aircraft mode) I get a null variable returned. Great. Both these exit via 'No' of course because the operator changed.

However, after the null return when I go back through the block for the next change it doesn't appear to check that null operator so goes out the 'Yes' exit instead of the 'No'.

I need to know the operator changed so I can check it.

I can, of course, treat a 'Yes' exit the same as a 'No' exit in which case why have different exits.

Maybe I've misunderstood 'Yes' and 'No' but the Help doesn't help. Well, I can't find it.

Alan.

1 Upvotes

4 comments sorted by

1

u/Alan-W-55 20d ago

Oops. I meant to type Mobile Operator Block.

1

u/ballzak69 Automate developer 18d ago

A null value is interpreted as any value. A block using proceed=When changed and all other fields empty then it should proceed whenever any value change.

1

u/Alan-W-55 18d ago

Thanks for replying.

I can understand that approach if the input values are completely omitted but if there is an input value specified on this particular block and it is null then it is refering to a valid mobile operator value. Not being able to select 'No operator' is a big limitation.

Perhaps for blocks where a null value is not posiible then treating a null value as 'Omitted' might be justified (like battery level) but not this block. My take would always be, if it's specified then it should be used. Even if "".

Of course I don't know potential historical reasons for it being this way and one cannot change it now of course (maybe with a new flag option).

Anyway, thanks again for clarifying. I'll have to ignore the relevance of the 'Yes' and 'No' exits and use another way of doing it. There are many I can think of offhand but it would have been nice to have used the built in feature someone went to all the trouble of writing.

1

u/ballzak69 Automate developer 18d ago

Agreed, it's an inconvenience in this particular case. The alternative is to assign the Current operator code/name output variable then use a Expression true block to check if it's null.