Text(String) how to use an index?

(Andrew Catchpole) #1

Using the Text(String) function I would like to pass a string which has an index value so that I can repeat the action multiple times. I can repeat the action multiple times by hard-coding each attribute however it makes the flow too long and becomes slow to edit

Using the Text(String) action I can successfully enter the following in the Text box {{string{{index.attributes__index}}}} without an error

When I save the activity "Problems with Missing Outputs"

Should I get this error or is there a better method to achieve this?

(Andrew Catchpole) #2

ps - I cant use the Set Attributes action as the strings are more than 200 chars which is why I’m having to split the string using the Text (String) action.

(Daniel Beckett) #3

Unfortunately, nested variables aren’t supported so {{string{{index.attributes__index}}}} won’t work.

If the text is always the same you could perhaps make use of a loop to repeat the action?
Here’s an example flow showing how to create a loop:

(Andrew Catchpole) #4

I suspected this was the case. I was trying to use text split to help screen scrap a Web page. Because the flow was getting big and slow to edit I was hoping to repeat the actions rather than processing each text output from the text split.