Skip to main content

Notifications

Community site session details

Community site session details

Session Id : c21QZwNgQfZdC5jBY1Odmd
Power Automate - Building Flows
Answered

Select an object entry according to a variable value

Like (3) ShareShare
ReportReport
Posted on 10 Sep 2024 14:59:33 by 81
Hi there,
 
I want to select a column from a object dropped from a teams list. the column name depend on the current date.
 
The flow is triggered every sunday at 11:00 pm.
 
From current date I get the week number, and I create a variable with the column name I want to select in the 
 
I want to use this variable to select the column I want in my object, to then get the data from this column
 
Is there a way to perform such a dynamic column selection?
 
thanks!
 
  • Verified answer
    SP-04091518-0 Profile Picture
    81 on 16 Sep 2024 at 14:28:26
    Select an object entry according to a variable value
    I create an array "dynamicFields' with all the possible fields ['week1', 'week2', ..., 'week42']
     
    I set up the current week number in the variable "reportNumber"
     
    then I used the select action:
    • my object as input
    • map is set up with a function: 
    item()?[variables('dynamicFields')[variables('reportNumber')]]
     
  • SP-04091518-0 Profile Picture
    81 on 11 Sep 2024 at 09:41:35
    Select an object entry according to a variable value
    all right, this is my flow:
     
    here is a sample of what comes out of the "get item" action. I have 24 entries and I want to select one of them
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    42,060 Super User 2025 Season 1 on 10 Sep 2024 at 18:56:14
    Select an object entry according to a variable value
    Hi,
     
    Please provide actual examples with visuals. just sorta tossing out details is not enough and too much to ask of people.
     
    Make it super simple for us to answer by providing step by step, with actual details so we can help you 1 time :-) and get you sorted.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 105

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 84 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 62 Super User 2025 Season 1

Overall leaderboard
Loading started