User-defined Condition

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
Gilleshander
Posts: 2
Joined: 19 Jan 2016 13:22

User-defined Condition

Post by Gilleshander » 12 Oct 2017 08:58

Hi,
I would need to define my own conditions, i.e set some personnal flows that should always return true or false, and would appear in the conditions list, or a kind of "User defined" condition list.
Some workarounds are possible today (execute a flow or script, set a variable to test outside...) but this is not natural and add complexity to flow (loss of readability).
Thanks

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: User-defined Condition

Post by Desmanto » 12 Oct 2017 14:24

Your flow always return true/false, means it can be stored into single variable. Just use Global Variable, example : global_personnal. Then to check the condition, just use expression

Code: Select all

global_personnal
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Gilleshander
Posts: 2
Joined: 19 Jan 2016 13:22

Re: User-defined Condition

Post by Gilleshander » 13 Oct 2017 08:25

Desmanto wrote:Your flow always return true/false, means it can be stored into single variable. Just use Global Variable, example : global_personnal. Then to check the condition, just use expression

Code: Select all

global_personnal
Hi,
Thanks for your answer, yes I know it can work like that, but this is precisely what I'd like to avoid. My idea is to get a kind of "legacy" graphical condition block in the editor (I'm just a bit pertectionist ;) )

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: User-defined Condition

Post by Desmanto » 13 Oct 2017 09:17

Umm, if you only need it to be show as the text you want, why don't just rename that expression? Uncheck the default name, and put the name you want it to appear at the flow.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Locked