cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
donAlto
Level: Powered On

Increment Letter

Does anyone have a simple way to increment a letter in the alphabet to the next available letter?

A>B

B>C

and so on?

1 ACCEPTED SOLUTION

Accepted Solutions
donAlto
Level: Powered On

Re: Increment Letter

The idea from @RezaDorrani was more appealing to me as it obscurs the lookup list from a curious user but I could not get it to work lookup both on the ID and the Title (string). Instead I used an old fashioned approach of using a SP List with two columns

ID / Title

1 / A

2 / B

3 / C

etc.

 

Then I used the action "Get List" with the filter of "title eq <letter>" to dynamically look up the matching ID of a given letter (e.g. Letter 'C' would return '3'). Then, to increment to the next available letter I use the expression add(1,items('Apply_to_each')?['ID']) to increment to the next available ID. 

 

Finally, I use a Get Item action with the newly incremented ID to find the letter which maps to the new integer.

View solution in original post

5 REPLIES 5
donAlto
Level: Powered On

Re: Increment Letter

I found a way to do this using a lookup list of the alphabet and incrementing on the ID value.

Thanks

Dual Super User
Dual Super User

Re: Increment Letter

Hi @donAlto 

 

Create an array of alphabets as a variable and then get the value using index

0 - A

1- B

...

25 - Z

 

Capture.PNG

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: Increment Letter

Hi @donAlto , 

 

Could you please share more details about your solutions so we could learn from the solution?

 

And if your problem has been solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

donAlto
Level: Powered On

Re: Increment Letter

@RezaDorrani I like your solution.

One issue. I also need to be able to determine the current index of a given letter, so i need:

 

a) Lookup letter by index (your solution)

b) Lookup index by letter (???)

 

Is it still possible to use the array and do B as well?

donAlto
Level: Powered On

Re: Increment Letter

The idea from @RezaDorrani was more appealing to me as it obscurs the lookup list from a curious user but I could not get it to work lookup both on the ID and the Title (string). Instead I used an old fashioned approach of using a SP List with two columns

ID / Title

1 / A

2 / B

3 / C

etc.

 

Then I used the action "Get List" with the filter of "title eq <letter>" to dynamically look up the matching ID of a given letter (e.g. Letter 'C' would return '3'). Then, to increment to the next available letter I use the expression add(1,items('Apply_to_each')?['ID']) to increment to the next available ID. 

 

Finally, I use a Get Item action with the newly incremented ID to find the letter which maps to the new integer.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,582)