Hello World!
I have a flow which runs successfully. However, of the 4 fields which come from Sharepoint metadata, 1 of them emanates from the term store and one from a dropdown list. When the flow runs, and the script takes the selected variables and sends them via email, the output is as follows:
Facility Name | Vendor Name | Service | Renewal Notice Date |
[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy","TermGuid":"a8150466-ae48-479a-acc7-58d619607036","WssId":3,"Label":"Facility Name","Path":null,"Value":"Facility Name|a8150466-ae48-479a-acc7-58d619607036"}] | Vendor Name | [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Service"}] | 2022-02-25 |
For the fields of Facility Name and Service, i would like the script only to send the Value portion of the strings, and not the entire string.
All help is appreciated.
Thank you
Ezra
Solved! Go to Solution.
Hi @PPG-Ezra
What you've got there is an array. You can select the key value by constructing an expression. If I copy your array as an object i.e. everything within {} I can query it by adding ?['value'] to the end of the expression.
If I was to be working with an array [], I would need to get the first() object {}. I can do this as follows:
first(outputs('compose'))?['value'] OR outputs('compose')?[0]?['value']
I've a wee video on basic JSON expressions here https://youtu.be/6nJSUNh579w
Cheers
Damien
Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks
Hi @PPG-Ezra
What you've got there is an array. You can select the key value by constructing an expression. If I copy your array as an object i.e. everything within {} I can query it by adding ?['value'] to the end of the expression.
If I was to be working with an array [], I would need to get the first() object {}. I can do this as follows:
first(outputs('compose'))?['value'] OR outputs('compose')?[0]?['value']
I've a wee video on basic JSON expressions here https://youtu.be/6nJSUNh579w
Cheers
Damien
Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks
thank you @DamoBird365
the issue i am having now is that the expression would need to extract the value of an array which is already part of a for-each loop.
the previous output is @{outputs('Get_files_(properties_only)')?['body/value']}, followed by a date condition.
if true, i need to append that set of variables to an array, one of which is Facility Name.
when i insert your formula as the following:
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |
User | Count |
---|---|
49 | |
29 | |
24 | |
23 | |
20 |