Hi
I'm trying to return an additional SP column in a Flow I've inherited. I've checked the name of the field in the address bar and it's showing as 'BTG%5Fx0020%5FPolicy%5Fx0020%5FOwner'. I've added it to the Uri but I'm getting the following error:
The query to field 'BTG_x0020_Policy_x0020_Owner' is not valid. The $select query string must specify the target fields and the $expand query string must contains BTG_x0020_Policy_x0020_Owner.
clientRequestId: 7a8296bc-5ebc-46cc-bb70-91bcc63de8b0
serviceRequestId: 6197499f-500b-a000-9d7a-15393aae9596
The field in SP is a 'People Picker' field. I'm also figuring out how the script works after $filter.
Any help appreciated!
Solved! Go to Solution.
Hello @darrenfloyd666
A little correction to $select and $expand 🙂
... $select=BTG_x0020_Policy_x0020_Owner/Title,Policy_x0020_Expiry&$expand=BTG_x0020_Policy_x0020_Owner ...
Kind regards, John
Hello @darrenfloyd666
Did you find an answer to your question?
As you wronte the 'BTG_x0020_Policy_x0020_Owner' is a people field, so you have to get the value from it using both $select= ... and $expand= ...
In both places you have to use the BTG_x0020_Policy_x0020_Owner/title - this should give you the value of the field.
Unsure if title after the slash is correct, else you will have to search for this information 🙂
Hope this helps a little. Kind regards, John
Thanks @JohnAageAnderse added the column to the select:
and I'm getting the following error:
The query to field is not valid. The $select query string must specify the target fields and the $expand query string must contains BTG_x0020_Policy_x0020_Owner.
Which I've Googled and I'm not getting much luck.
Hello @darrenfloyd666
You are nearly there 🙂
The select and expand should look like this example, where I use the Author column in my list:
?$select=Author/Title&$expand=Author
Select states what to get, in the above it is the Authors title aka name. Select can only get it, because Expand helps providing the additional information.
Kind regards, John
Thanks @JohnAageAnderse , I think I'm close! I'm getting a different error message!
Is it because of the '/' after the expand?
Hello @darrenfloyd666
A little correction to $select and $expand 🙂
... $select=BTG_x0020_Policy_x0020_Owner/Title,Policy_x0020_Expiry&$expand=BTG_x0020_Policy_x0020_Owner ...
Kind regards, John
Brilliant! That worked! Thanks!
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
27 | |
26 | |
24 | |
23 | |
14 |