Forum Discussion

Deleted's avatar
Deleted
Mar 27, 2019

Flow - pulling correlated value from a list to assign as a variable

I have a list with our 3 offices listed and we have an HR Approver and a Finance approver for new hires. I would like to plug in the approvers into my approval workflow as a variable based on which location which is a value "Location" in the form.

My equation looks like this:

HR-Approver where Locations eq 

 

I know the "Where" clause is not valid. How would one achieve this?

 

The example is someone in the Dallas office submits a request for approval I want "Jill" to show up in the workflow as the approver.

 

In Nintex this is really easy. With Flow I am confused as to how to achieve a similar result. I created a variable called HR-Approver and am trying to assign the approver whose location matches the location passed in the form to that variable.

 

Guidance would be appreciated.

  • Tom_Santos's avatar
    Tom_Santos
    Copper Contributor

    Hi Deleted,

     

    I couldn't tell from your post where you're deriving the LOCATION variable in your screenshot for the formula. As I understand it, that LOCATION would have to be derived from the Requestor's location. I'm not sure how you're doing that now. 

     

    Having said that, I created a similar SharePoint list to yours:

     

     

     

     

     

     

     

     

     

     

    And I created a basic Flow with a SharePoint 'Get Items' action, with a Filter Query:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Where "Location" matches exactly the internal name of the SharePoint column, and for the time-being I'm hard-coding the location I want. This properly queries the SharePoint list, and returns the one record that has location of "Dallas."

     

     

    Hopefully, that gives you a sense for the OData filter syntax. Let me know how you're deriving the requestor's location. 

     

    Once you do get the Location in a variable and use it in the filter, you might need to surround it with single quotes:

     

     

    Hope this helps. 

Resources