cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KaylaKirzinger
New Member

Pass a variable to Graph API call text string

I am currently trying to implement Graph calls in an app such that a user can enter data into a field, and have the contents of that field passed to a Graph API call string such as:

 

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':"givenName eq '&&&&'"})}) where &&&& is the string entered into the data field.

 

I have my connector set up to hit https://graph.microsoft.com/beta/users?$filter={filter}. I have no issues returning data in my app when I hard-code the filter value so I know that the connector is working, but I can't figure out a way to pass something into the text string. All options that I've tried so far treat the variable as text, and I can't seem to escape the text string in such a way that the syntax works.

 

I've considered trying to find a way to save the entire URL off as a variable but I haven't been able to make that work either.

 

Any help would be greatly appreciated.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
gabibalaban
Super User II
Super User II

I'm just wondering if you tried 

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':Concatenate(Char(34),"givenName eq '",TextInput1.Text,"'",Char(34))})})

View solution in original post

v-siky-msft
Community Support
Community Support

 

Hi @KaylaKirzinger

 

What is the formula you are using?

That could be a grammatical error. Please try the following codes

 

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':"givenName eq " & TextInput1.Text})})

Or

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':"givenName eq '" & TextInput1.Text & "'"})})

 

Sik

View solution in original post

2 REPLIES 2
gabibalaban
Super User II
Super User II

I'm just wondering if you tried 

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':Concatenate(Char(34),"givenName eq '",TextInput1.Text,"'",Char(34))})})

View solution in original post

v-siky-msft
Community Support
Community Support

 

Hi @KaylaKirzinger

 

What is the formula you are using?

That could be a grammatical error. Please try the following codes

 

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':"givenName eq " & TextInput1.Text})})

Or

UpdateContext({employeeList: 'GraphAPIConnector'.EmployeeSearch({'$filter':"givenName eq '" & TextInput1.Text & "'"})})

 

Sik

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (960)