Counter _1

I want to create a counter as 01 on increment as 02,03 till 12. How can I do it

Hi @sathish_kumar3

You can use while loop for this, here are the steps

  1. In Assign counter = 1
  2. In while loop set condition as counter <=12
    3.inside while do the logic an you want and increase the counter at last in assign counter = counter + 1

I want the count as 01,02,03,04,05 till 12. I tried this but it shows 1,2,3

@sathish_kumar3 use an if condition inside while and check counter.length = 1 ,in then part put assign and give counter = “0”+counter.tostring

There is an error. Can u send a sample xaml

@sathish_kumar3

Please find the workflow

Main.xaml (8.3 KB)

image

@sathish_kumar3 Please close this thread as well by mark the solution.

Thanks

Hi @sathish_kumar3
Please try this also
PadLeft.xaml (5.3 KB)

While using your counter value: counterVariable.ToString.PadLeft(2,CChar(“0”))

Thanks!

1 Like

@kadiravan_kalidoss Thanks for the syntax its make the code much easier to read.

1 Like

Hi @sathish_kumar3

Please find the updated workflow,
Main.xaml (6.8 KB)

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.