Hey all, I have a very unusual problem here: I don't know whether to look for a solution or to stop at what I have.
So, here goes-> I have made a connector that makes a POST call. The input contract is as follows:
{
"Template Name": "NORUBREIntegrationTemplate_Sample",
"Template Input":{
"Entity Name":"Anything"
}
}
or
{
"Template Name": "GDPR",
"Template Input":{
"GDPR_Name":"Anything",
"GDPR_PostalAddress":"Anything"
}
}
and so on. So as you can see the input going inside Template Input is dynamic and depends on Template Name. So, I used x-ms-dynamic-schema for this and I got what I achieved, when someone entered the Template Name, a GET call was made to fetch the schema and user could see dynamic boxes:
So its fine now, the POST call is going successfully, but now I receive a JSON array of Policies(length of array is dynamic and depends on Template Name and Template Input). Each element in Policies is an array of Rules and each Rules element contains a JSON Object RuleOutput:(let me show the structure)
{
"Policies":[
{
"PolicyName":"1",
"Rules":[
{
"RuleOutput":{
"Rule1":"admin@admin.admin",
"Rule2":"admin@admin.com"
}
},
{
"RuleOutput":{
"Rule1":"james@admin.admin",
"Rule2":"tom@admin.com"
}
}
]
},
{
"PolicyName":"2",
"Rules":[similar structure as above]
}
]
}
Now that the context of the problem is set, the problem is I want my user to get the value of Rule1, Rule2, i.e the admin@admin.admin and admin@admin.com . He/she knows the key that is Rule1 or Rule2 or anyother and can use it to get the value of any Rule element. I am putting RuleOutput in Compose and using expression outputs('Compose')['Rule1'] or to get the value as below:
In image 'ApproverAlias' is a key in RuleOutput
Now the problem is I don't want my user to enter an expression like this, I want the UI to be friendly and I can't seem to find any better approach. Can you suggest if we can come up with a mechanism where user can type in only the Rule1 or Rule2 and not the expression OR maybe a dynamic dropdown or something. Open to suggestions. Thanks
Hi @t-prrath
I believe this is a custom connector and you have all the control for the POST output as well. You need to think about redesigning the JSON output so that users can directly map the value as a dynamic variable.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThe first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
27 | |
26 | |
23 | |
14 | |
10 |
User | Count |
---|---|
63 | |
56 | |
29 | |
28 | |
24 |