Macro

Hi,

Within a Form I have a singular flow with a parameterized switch which then returns a template for use within the form based on which action is taken on the form. This cuts down how many flows are created for a form when trying to make it dynamic. However I don't necessarily want to also create a bunch of templates. Is there a listing of macros that are available for use within templates?

 

I'm trying a condition like <!--{{#ifCond name '==' 'actionName'}}--> ..... <!--{{/ifCond}}--> This way I can use a template as well to be somewhat dynamic in what is displayed.

 

Thanks,

Tags macros
Asked by Alex Haberer on Fri 1/19/24 9:12 AM Last edited Fri 1/19/24 10:56 AM
Sign In to leave feedback or contribute an answer

Answers (2)

This answer has been marked as the accepted answer
Miles Bagwell Fri 1/19/24 3:48 PM

Alex,

I hope you don't mind, but I went into your iPaaS environment and made a copy of the template you mentioned. I added additional parameters for each column that will set the column class to whatever is passed in. I then defined a hide class to let you set which columns should be hidden on the template. I think this accomplishes what you are looking for. Please let me know if you want me to revert those changes or if you have any questions.

Template

No feedback

Miles Bagwell Fri 1/19/24 10:27 AM

Hi Alex,

You can see all of the available macros on the template builder. You'll also see a Macro Help tab there.

The only way I've been able to use conditionals in the way you mentioned is to use the Table - Each Row macro. Even if it is just for a single property, you can make this work by the condition you set when populating the template in a flow.

In the screenshot below, I'm  populating a single "row" on the template only when some condition is met. Choose to Autofill with Iterator and set the where clause to your condition.

 

Try that out and let me know if that works for you or if you still have any questions!

Thanks,
Miles

No feedback
Sorry not sure if you understood what I meant.

So in my Form I have a list of buttons in a 3 column row. The 2nd column is a result pane and the 3rd column is like a reminder pane.

The second column will be used to pull updates from the flow based on the button clicks via actions.

The actions pass a parameter to the single flow. The flow has a "outputTable" which is a culmination of all of the different switch statement encapsulated tables. So when a specific parameter is passed to the flow the switch then runs a particular piece of code in the flow then pushes/adds data to the master table. This table is then pushed into a template to be returned to the Form.

Within the template I also would like to have a way to switch what type of html/layout I would like to display based on the type of data passed from the flow to the template for use within the Form.

Let me know if that makes sense otherwise I can save some screenshots and try to attach them.

Thanks,
- Alex Haberer Fri 1/19/24 10:36 AM
I've uploaded some screenshots to show you what I mean. Essentially I would like to be able to utilize 1 template rather than create a bunch of separate ones as I'm already setting up a dynamic way to return different sets of data to the template from the flow.

Thanks,
- Alex Haberer Fri 1/19/24 10:43 AM