web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Specific Item from...
Power Automate
Unanswered

Get Specific Item from a SharePoint List based on Value in another

(0) ShareShare
ReportReport
Posted on by 63

Hi,

 

Hope you can help me as I'm really new to this and having trouble!

What I'm trying to do is change a year of birth value to a specified age range (eg '1977' to '40-49').

 

I have a sharepoint (List 1) with a column that collects a user's year of birth called 'year'.

I need to be able to somehow transform that value to another value based on a column called 'age range' in another (List 2.).

 

For example, if a user enters '1977' in the year column in (List 1), I want the flow to take this value, lookup the corresponding year value contained in (List 2), retrieve the value from 'age range' and write the output back to a new column called 'calculated age range' in (List 1).

 

Hope this makes sense - Thanks!

Categories:
  • RobElliott Profile Picture
    10,547 Super User 2026 Season 2 on at

    Hi @MP4249 , have you got access to PowerApps? You can have a customised SharePoint form with PowerApps that will allow you or the user to create the item, will look up the age range automatically and then save all the data back to the SharePoint list in one action including the range for the AgeRange column. In this scenario I think that's much easier than using Flow.

    Rob
    Los Gallardos

  • MP4249 Profile Picture
    63 on at

    @RobElliott 

     

    Hi Rob,

     

    Thanks, I'm sure you are right and it is a much better way.

    I do have powerapps but can't figure out how I would do that exactly - do you mind breaking it down for me a bit?

     

    Im a real beginner here so I appreciate the help

  • v-lin-msft Profile Picture
    728 on at

    Hi @MP4249,

     

    Could you please share a screenshot of your flow’s configuration?

    According to your description of your requirement, I have created a flow try to recreate your scenario:

    Step 1: Process the current time format as ‘yyyy’, and the year contained in the newly created item is obtained, then calculate the difference between them.

    Step 2: Judge the range of different values. If the range is greater than or equal to 40 and less than or equal to 49, find the corresponding column value in “Age Range” list, get the return value.

    Step 3: Update the column "calculated age range" in Year list with returned value from action Get items.Annotation 2019-05-27 123325.png

     

    Annotation 2019-05-27 123502.png

    You can have a try. If there is any problem, please contact us.

     

    Best Regards,

    Community Support Team _ Lin Tu

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

     

  • RobElliott Profile Picture
    10,547 Super User 2026 Season 2 on at

    Hi @MP4249 although @v-lin-msft has given you a flow solution I'll just give a quick demonstration of how it could be done with PowerApps.

     

    • I've got a SharePoint list with the Year and the Range (image 0 below).
    • From the SharePont list click on PowerApps and create a custom form. Keep the data text fields (the ones in green in the images below) but you can hide them later.
    • For each one add a dropdown control (I've named it ddYear). The default value will be the value in the SharePoint list, e.g. ThisItem.Year. For the Year dropdown I've got it looking at the Title column in the Range list.
    • The year text box for the data has a default of ddYear.SelectedText.Value which is the value in the dropdown.
    • For the age range lookup the text box for the data has a default value that does a lookup on the range table where the title column is equal to the selected value in the dropdown, and it returns the value from the Range column. As soon as you change the selection in the ddYear dropdown the value of the age range will get updated.
    • The save button then submits all the data in the textboxes to the item the SharePoint list using SubmitForm(SharePointForm1) in the OnSelect function.

    Sorry for the delay in replying, it's been a fiesta here this weekend.

    Rob
    Los Gallardos

    0-Range lookup list in SharePoint0-Range lookup list in SharePoint1-Year dropdown1-Year dropdown2-Year text box2-Year text box3- Age Range text box with lookup syntax3- Age Range text box with lookup syntax4- The live form4- The live form5-The result in SharePoint5-The result in SharePoint

  • MP4249 Profile Picture
    63 on at

    @RobElliott 

     

    Hi Rob,

     

    Many thanks for your reply, great suggestion but in this case I'll need to rethink it slightly as users will not be submitting in this way.

     

    So I actually have an existing PowerApp for this solution - the process is:

     

    1. Users submit via Microsoft web form - this contains a field called 'Year' which is the 4 character year of their birth.

    2. Flow runs and creates SharePoint list item with this web form data.

    3. Internal users use PowerApp to view and sort this data, however I need them to sort on an age range rather than year.

     

    Is there a way of filtering the gallery using your method?

     

    Thanks,

    Mike

     

     

  • MP4249 Profile Picture
    63 on at

    @v-lin-msft 

     

    Hi many thanks for your reply,

     

    I have attempted to rebuild the Flow as per your suggestion but am unable to replicate the second Compose Operation:  sub(int(outputs('Compose')),body('Get_item')?['Year'])

     

    This returns an invalid expression every time I try - any further help here appreciated as I am new to Flow.

     

    Thanks,

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard