I can not seem to find out how to get the length (number of characters) of a variable.
Is there a built in way in Switch to do this?
Or do I have to use scripting?
Length of variable
Re: Length of variable
I am interested in hearing what the use case is.
If the number of possibilities is limited you could create a condition with variables where you match the variable with .{3} for three characters etc. On the outgoing connection folder you can then set private data with the number.
If the number of possibilities is limited you could create a condition with variables where you match the variable with .{3} for three characters etc. On the outgoing connection folder you can then set private data with the number.
- JimmyHartington
- Advanced member
- Posts: 365
- Joined: Tue Mar 22, 2011 7:38 am
Re: Length of variable
I have an action list, which places a string (variable from Switch) onto the first page.
If the number of characters of the string is larger than 90 I would like to set the font size to another value.
And since Loic Agnon showed the conditional variables in Pitstop I would like to use them to set the font size dynamically.
But since thinking about it I have another way in this case to achieve what I want.
After I add the text I select all text with which overlaps the media box and scales it down to a specific width in mm.
If the number of characters of the string is larger than 90 I would like to set the font size to another value.
And since Loic Agnon showed the conditional variables in Pitstop I would like to use them to set the font size dynamically.
But since thinking about it I have another way in this case to achieve what I want.
After I add the text I select all text with which overlaps the media box and scales it down to a specific width in mm.
- magnussandstrom
- Advanced member
- Posts: 447
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Length of variable
I have done a similar thing, similiar to Freddys idea. Maybe this helps:
- JimmyHartington
- Advanced member
- Posts: 365
- Joined: Tue Mar 22, 2011 7:38 am
Re: Length of variable
Thanks Magnus for the example.
In my current use case I will use the other idea with scaling the content, which overlaps the media box.
In my current use case I will use the other idea with scaling the content, which overlaps the media box.