Skip to main content
Question

How to Loop through a string variable??

  • February 14, 2023
  • 3 replies
  • 519 views

Forum|alt.badge.img+1

Hi, I’m a student who’s trying do assignment in Automation anywhere there’s some table data i have extracted from a pdf as a string variable.

100 Clear front covers $0.49 $49.00 
100 Black rear covers $0.99 $99.00 
100 Color copies (pages 1-2) $2.99 $299.00 
1000 Black and white copies $0.25 $250.00 

 

I want to manipulate this string and get data separately I'm thinking if I can loop this string and get one by one rows to manipulate and get Like 100, Clear front covers, $0.49, $49.00. Thank you :)

3 replies

Forum|alt.badge.img+12
  • Navigator | Tier 3
  • February 14, 2023

Just to clarify, is each row above a string? Or is the whole block (all 4 rows) one string? That will affect the type and number of splits you need to do.


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • February 14, 2023

@Kavindu Perera :

 

you may be looking to extract or splint the data then use Extract text command 

 


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • February 15, 2023

Just to clarify, is each row above a string? Or is the whole block (all 4 rows) one string? That will affect the type and number of splits you need to do.

Whole four row is one string and i want separate into one by one. and some times it can be 3 or less rows too