cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RosstheBoss
Frequent Visitor

Using a Variable to Select which List To reference

I am trying to use power automate desktop to help enter some information into Excel. The problem I am having is I have three different lists I need to reference, depending on the value of a cell in my excel Data. I tried creating a variable that will reference the cell, pulls in the name, and then use that to tell it which list to pull from but I could not get it working. I tried %[Condition]% as the syntax and %'Conditon'%. Is it possible to do this?

 

ConditionData1Data2
List 1NRR
List 2RR
1 ACCEPTED SOLUTION

Accepted Solutions
MichaelAnnis
Super User
Super User

For forks in your process, you want to use a Switch action combined with a Case action. It kind of looks like this.

 

read Excel to %DecisionMaker%

Switch on %DecisionMaker%
    Case Option1

        ‘Do option 1

    Case Option 2

         ‘Do option 2

    Case Else

        ‘Do option 3

End

 

best of luck

View solution in original post

2 REPLIES 2
MichaelAnnis
Super User
Super User

For forks in your process, you want to use a Switch action combined with a Case action. It kind of looks like this.

 

read Excel to %DecisionMaker%

Switch on %DecisionMaker%
    Case Option1

        ‘Do option 1

    Case Option 2

         ‘Do option 2

    Case Else

        ‘Do option 3

End

 

best of luck

RosstheBoss
Frequent Visitor

I was hoping to avoid that, but if I cannot use a variable to point to another variable I will have to do it.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,523)