Hello everyone, i am trying to get the users' email and name from sharepoint group using Microsoft Flow and store them into array before passing it to powerapps. I am planning to have a collection of the particular array in powerapps.
How do i continue the flow from here?
I am trying to get the array value from the sharepoint group in Microsoft Flow before passing it to powerapps.
Once i have passed the array value from flow to powerapps, i want to store them into a collection
Solved! Go to Solution.
Hi @CYJ :
I did a test with reference to your method and got the correct result:
My method is to integrate the results into a string and pass it to powerapps, then write a formula in powerapps to reformat the string into a table.
1\My flow('PowerApp->SendanHTTPrequesttoSharePoint')
2\Add a button and set it's OnSelect preperty to:
Clear(thetable); /*thetable is my custom collection*/
ForAll(
Split(
'PowerApp->SendanHTTPrequesttoSharePoint'.Run().groupmember,
"##"
),
Collect(
thetable,
{
email: First(
Split(
Result,
";;"
)
).Result,
name: Last(
FirstN(
Split(
Result,
";;"
),
2
)
).Result
}
)
)
3\Add a table
Items:
thetable
Best Regards,
Bof
I think i am getting close here. Here is my current workflow but i am getting null values in powerapps.
In powerapps, i am receiving null values which i have set it to a text.
Hi @CYJ :
I did a test with reference to your method and got the correct result:
My method is to integrate the results into a string and pass it to powerapps, then write a formula in powerapps to reformat the string into a table.
1\My flow('PowerApp->SendanHTTPrequesttoSharePoint')
2\Add a button and set it's OnSelect preperty to:
Clear(thetable); /*thetable is my custom collection*/
ForAll(
Split(
'PowerApp->SendanHTTPrequesttoSharePoint'.Run().groupmember,
"##"
),
Collect(
thetable,
{
email: First(
Split(
Result,
";;"
)
).Result,
name: Last(
FirstN(
Split(
Result,
";;"
),
2
)
).Result
}
)
)
3\Add a table
Items:
thetable
Best Regards,
Bof
Hi @CYJ :
You don't need to add Applay to each action manually.
I recorded a video for your reference:
Best Regards,
Bof
I think the error occurs due to the array value i am receiving from Parse Json. I am not so sure.
Hi @CYJ :
This is my setting:
{
"type": "object",
"properties": {
"d": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"uri": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"Alerts": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": {
"type": "string"
}
}
}
}
},
"Groups": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": {
"type": "string"
}
}
}
}
},
"Id": {
"type": "integer"
},
"IsHiddenInUI": {
"type": "boolean"
},
"LoginName": {
"type": "string"
},
"Title": {
"type": "string"
},
"PrincipalType": {
"type": "integer"
},
"Email": {
"type": "string"
},
"Expiration": {
"type": "string"
},
"IsEmailAuthenticationGuestUser": {
"type": "boolean"
},
"IsShareByEmailGuestUser": {
"type": "boolean"
},
"IsSiteAdmin": {
"type": "boolean"
},
"UserId": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"NameId": {
"type": "string"
},
"NameIdIssuer": {
"type": "string"
}
}
},
"UserPrincipalName": {
"type": "string"
}
},
"required": [
"__metadata",
"Alerts",
"Groups",
"Id",
"IsHiddenInUI",
"LoginName",
"Title",
"PrincipalType",
"Email",
"Expiration",
"IsEmailAuthenticationGuestUser",
"IsShareByEmailGuestUser",
"IsSiteAdmin",
"UserId",
"UserPrincipalName"
]
}
}
}
}
}
}
Best Regards,
Bof
Hi @v-bofeng-msft ,
It is working now. I redo the whole flow again. Maybe i have inserted a wrong value or output somewhere in the flow. Thanks
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |