Trigger check

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

Moderator: Martin

Locked
bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Trigger check

Post by bogdyro » 11 Jun 2018 14:17

Hi Martin. I have a little request. It's not a big deal but what more could I ask from such a features filled app? :)
Could you develop a condition to evaluate the triggers of a flow ? Right now I'm using condition 'expression:' to contain or equal the name of the trigger but it's a pain to copy the name of triggers and paste them around. So a special condition for this would be nicer. For instance select the trigger we want, equals/contains/wildcards,etc
It would simplify things for me since I'd like to keep alot of triggers in the same flow.
Thanks

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Trigger check

Post by digitalstone » 11 Jun 2018 16:18

I keep a "special" flow for reoccurring conditions like that.
Where i have all my trigger conditions neatly together.
All have the same name-structure like:

Trigger:
Manual

Trigger:
Manual or Widget

Current Profile:
Outdoor

Current Profile:
Work
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Trigger check

Post by bogdyro » 12 Jun 2018 05:28

Yeah, but that's possible for only a few use cases, I'm talking about a condition that applies to any trigger in any flow.

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

Re: Trigger check

Post by Desmanto » 12 Jun 2018 10:37

That is why I create a flowception, called "Trigger to Expression". Later I merge this into a bigger flow, which also check for list value for Input Dialog. The flow is related to another flow again, which use widget too. Kinda difficult to share without sharing them all at once, and without giving proper explanation on how to use it (and that will takes a lot of time). And it relies on widget and accessibility, so need to adjust again in different devices.

The feature should be called as a template, as ever requested before. What my flowceptions do is to pull all avalaible triggers on a flow (when you have multiple triggers, you have the choice with the names). From the names, i feed them into input dialog choice to choose which trigger need to be filtered. Added up extra choices for Manual and Widget Click. So I can put expression such as

Code: Select all

trigger == "Manual"
or something like

Code: Select all

containsElement(newList(
"Manual",
"Widget Click"
), trigger)
These expression will be the filter for the multiple triggers in a flow. I am still adding some option till now. Such as possibility to choose widget name and x y when using widget click, choosing notification action number (I rarely use this). But lately I am kinda distracted by so many flows at once. Changing phone require me to create some new flows to accomodate the new feature (and lack of feature).
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.

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Trigger check

Post by bogdyro » 12 Jun 2018 13:06

Yeah, good idea. Should work well. But I think a built in feature would be nice.

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Trigger check

Post by digitalstone » 12 Jun 2018 13:36

Desmanto's idea was exactly what i meant actually. But i think i explained it wrong.
I do indeed have those conditions with those names, but inside there is code like:

trigger=="Manual";
or
contains(trigger, "On")

Or something along the likes of that. And you can reuse those conditions everywhere.

I don't see how something like this could be a build-in feature.
There would be an impossible amount of possible outcomes.
This is why expressions exist. They ARE the tool.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

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

Re: Trigger check

Post by Desmanto » 12 Jun 2018 17:01

@bogdyro : Of course, This should be included in the template. As Automagic can directly parse the data from the available trigger itself. I wish there will be favourite elements tabs too. Adding the template "Triggers Check", will allow us to pick which triggers we wanna filter. Then it will automatically create an expression with the content

Code: Select all

trigger == "the triggername that we choose"  // for single trigger
or if multiple triggers choosen

Code: Select all

containsElement(newList(
"First trigger that we choose",
"Second trigger",
"Widget Click",
), trigger)
@digitalstone : This could be a built-in feature, but through the template. The current template allow us to create a loop, it will prompt for list variable to loop (you can see that it automatically filters out non list variable). When you select the list variable and press OK, BOOM, you can see the whole script, expression and notification on screen appear automagically below. This is the thing that we want.

We still use automagic built-in elements, still using the expression to filter out the triggers as shown above. But we want Automagic do it for us very quickly, as this is one of main my routine.

Most of my main active flows have more than 1 trigger. If there is a one-trigger-only flow, it is probably having some probation, I am doing some testing, something is wrong with it, thus need to be separated from the herd. After I know it is working perfectly, I will combine it to the nearest giant flow which share the same concept. Example all network related stuff in one giant flow. All remote server related in another 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.

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Trigger check

Post by bogdyro » 22 Jun 2018 15:42

+1 ?

lojzik
Posts: 9
Joined: 10 Sep 2018 08:03

Re: Trigger check

Post by lojzik » 13 Sep 2018 20:06

me too

Locked