cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
t-prrath
Microsoft
Microsoft

Options to make connector more user friendly

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:

Screenshot from 2020-06-27 15-45-29.pngScreenshot from 2020-06-27 15-45-21.png

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

Screenshot from 2020-06-27 16-17-36.png

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

1 REPLY 1
abm
Super User
Super User

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,996)