cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

@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

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

@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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,065)