cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Super User II
Super User II

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

Highlighted
Helper II
Helper II

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
Highlighted
Super User II
Super User II

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

Highlighted
Helper II
Helper II

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (10,090)