Jump to content

Transform multiple variables and combine them for the final output


Recommended Posts

Hi!

 

I am currently rewriting my Workflow for the Gallery.

 

I'll allow the user to make some configurations, some of them are checkboxes.

Alfred outputs a checkbox either as "1" (checked) or "0" (unchecked).

 

However, the program I'm feeding the final workflow to requires "true" and "false".

 

So I need to transform all checkboxes and replace 1 with true and 0 with false.

 

image.png.09bbce3a4c2d5ca0f4ae3bb4e8a63288.png

 

This is my current workflow.

 

On the bottom left there's a single trigger.

At the top, there are two "Arg and Vars" simply mapping a variable to {query}:

image.png.16c82f691d221429948416dd20052833.png

 

After that, two replace items are doing the replace from 0 and 1 to false and true.

And after that, a "Arg and Vars" writes back the query to the variable:

 

image.png.3442278b7bb43908ce3592883789c94b.png

 

However, in the debug node the transform is not visible. I only get the output from the bottom path with Run Script.

 

If I remove all connections to the debug node and only use a single connection from one of my variables, it works as expected.

 

My question is, how can I transform multiple variables as described above, combine everything together and feed the result to the debug node?

 

Thanks!

Edited by Manuel Rauber
Link to comment
  • Manuel Rauber changed the title to [Resolved] Transform multiple variables and combine them for the final output
  • vitor changed the title to Transform multiple variables and combine them for the final output

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...