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

Location codes to Location IRL

Hello,

 

I have a SharePoint list that tracks employees. 

This list will be added to over its life-cycle.

 

The issue I would like to resolve with flow however is that the 'base office' of employees is as follows: "UKY" for a York office.

 

Can I set up a flow whereby every Monday, it will search the list and change any codes to the actual location?

I have a list of exactly 35 location codes.

 

I assume something using a table may work however I'm not experienced enough to make this work.

 

Regards,

CameronTCD

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Location codes to Location IRL

@CameronTCD 

Hey there.  So, you are definitely on the right track with the table.  I'd suggest making a translation table in Excel or something that has the codes and the actual names.

 

You'll probably want to start with a Recurrence trigger to schedule the run for once a week on Mondays (or whatever you choose).

 

Follow that with a Get List Items from your SP list.  To shorten the list, you can use an OData filter to only grab items that have a value in that field with a length of 3 (or whatever the length is).  Search for OData, and also check out this article on functions, specifically 'Length' might be the one for you.   It's mostly like working in Excel, so don't worry if you don't like 'code'.

 

From there, you want to look at each item, right?  So start an Apply to Each loop, and get the corresponding name from your table.  For this, you can use a "Filter Array" to grab the row of your translation table that has the matching code.

 

After that (and still inside your Apply to Each loop), use the Update Item to update the field to the name instead of the code.

 

That should get you started.  Give it a go and keep us posted, we're happy to help out along the way.

 

-Ed-

 

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

CameronTCD
Level: Powered On

Re: Location codes to Location IRL

Hi @edgonzales,

 

Solution:

> Recurrence

> GetItems (List of employees)

> GetItems2 (AreaCode -> Area SP List)

> ApplyToEach to update with corresponding IRL location

 

Thanks you for your help.

 

Regards,

CameronTCD

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Location codes to Location IRL

@CameronTCD 

Hey there.  So, you are definitely on the right track with the table.  I'd suggest making a translation table in Excel or something that has the codes and the actual names.

 

You'll probably want to start with a Recurrence trigger to schedule the run for once a week on Mondays (or whatever you choose).

 

Follow that with a Get List Items from your SP list.  To shorten the list, you can use an OData filter to only grab items that have a value in that field with a length of 3 (or whatever the length is).  Search for OData, and also check out this article on functions, specifically 'Length' might be the one for you.   It's mostly like working in Excel, so don't worry if you don't like 'code'.

 

From there, you want to look at each item, right?  So start an Apply to Each loop, and get the corresponding name from your table.  For this, you can use a "Filter Array" to grab the row of your translation table that has the matching code.

 

After that (and still inside your Apply to Each loop), use the Update Item to update the field to the name instead of the code.

 

That should get you started.  Give it a go and keep us posted, we're happy to help out along the way.

 

-Ed-

 

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

CameronTCD
Level: Powered On

Re: Location codes to Location IRL

Hi @edgonzales,

 

Solution:

> Recurrence

> GetItems (List of employees)

> GetItems2 (AreaCode -> Area SP List)

> ApplyToEach to update with corresponding IRL location

 

Thanks you for your help.

 

Regards,

CameronTCD

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 (5,127)