Search code examples
rpaautomationanywhere

How to pass a hyphen ( - ) in an Automation Anywhere variable without being an operator?


AAE's "PDF Integration" command allows you to split a .pdf into a separate single file for a selected number of pages or range of pages (Figure 1). The "Single File With Selected Pages" field also allows you to input a variable. But how do you create a variable with a hyphen (-) included where it doesn't see that as an operator instead?

The way I currently have the variable in Figure 2, AAE will see the hyphen (-) as an operator and subtract the two nested variables. I've tried putting the hyphen in parenthesis, double-quotes, single-quotes, and I can't find anything in AAE's documentation that shows how to use the hyphen as a character instead of an operator. I also tried using a dash (–), but AAE doesn't appear to recognize a dash in that field. The only area in their documentation that references a dash is in dates.

The "Single File With Selected Pages" field in the "PDF Integration" command only allows you to enter 1 variable, so that is why I'm trying to create a "range" variable that includes the start and ending pages separated by the hyphen.

Figure 1:

Figure 1

Figure 2:

Figure 2


Solution

  • Workaround:

    Using variable operations: $start$#$end$ concatenate with any sign that's not math operation i.e #.

    Using string operation replace the sign with hyphen sign.

    Now you will have ie. 5-7 and you can use it in the pdf split command.