Passing parameters and question about Map

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Passing parameters and question about Map

Post by husky » 02 Apr 2017 22:29

Hello,

Question: 1

Given a flow named "A" and a one named "B", not related functionally and both have an Automagic shortcut, is it possible to pass a parameter from flow "A" to "B"?

Both widgets use the same global name for the message.
The idea is Flow "A" blanks message in Flow "B" and Flow "B" sets a message in Flow "A".

Question 2:

"Basic Research is what I do when I don't know what I'm doing".

So in my Basic Research i'm using the get FlowStatisticsDuration(). As per Help, it looks to me that the return from the function is a Map.

How do I get the key/value pair from the function.
I know how to add pairs manually to a Map but can't figure out how to get hold of the existing ones in the function.

Thank You

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

Re: Passing parameters and question about Map

Post by Bingwu » 03 Apr 2017 09:55

Hello Husky!

Only to question 1:

I do not quite understand your question. If the result is to set text (Flow B) or "delete" text (Flow A) in the same widget, then I have a suggestion. It does not transfer parameters from "Flow A" to "Flow B", it changes the widget (Let's call it "Flow C").
The prerequisite is that your widget (name = thewidgetname) already contains a text element (name = thetextelementname).

Flow A:
Alternative A1: Action -> Script (Function) -> setWidgetElementProperty("thewidgetname","thetextelementname","visible",false) // hides the text field
Alternative A2: Action -> Script (Function) -> setWidgetElementProperty("thewidgetname","thetextelementname","text","") // sets/changes the text (blank)

Flow B:
Alternative B1: Action -> Script (Function) -> setWidgetElementProperty("thewidgetname","thetextelementname","visible",true) // displays the text field
Alternative B2: Action -> Script (Function) -> setWidgetElementProperty("thewidgetname","thetextelementname","text","yourtext") // sets/changes the text (in "yourtext")

Of course, this also works with variables. (Alternative B2:) Action -> Script (Function) -> setWidgetElementProperty"({thewidgetnamevariable}","{thetextelementnamevariable}","text","{yourtextvariable}") // sets/changes the text (variable)

You can pass "parameters" (for example) with "Execute Flow" or provide it centrally ("global_...").

Best regards :-)
(Colorful) Peter

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Passing parameters and question about Map

Post by husky » 03 Apr 2017 14:00

Hello Bingwu, aka, Peter the colorful,

Perfect!!!!!


All options are exactly what I was looking for.
Alternative A1: Action -> Script (Function) -> setWidgetElementProperty("thewidgetname","thetextelementname","visible",false)
worked right off the bat!!

Thank You very much for all the options you sent me. I'd never would find the association between what I needed and the GerWidget... function.

Best Regards

Husky, the Basic Researcher
"Basic research is what I'm doing when I don't know what I'm doing"

Post Reply