cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kol
Level: Powered On

Custom connector: dropdown advanced options

I'm creating a connector in which one of the fields is about a language ID. Our API takes an integer, where for instance 1 is for English, 2 is for French etc.

It's not practical for users to have to research what is the ID of their language, so I wanted to do a dropdown where they would select the name of the language and it would send the corresponding ID to the API.

Eg: "English => 1", "French => 2", etc.

 

However, I don't understand if I can do that in Flows.

We don't have an API call that would return this information, so I can't create an action about it, and thus I can't use a dynamic dropdown.

Is there a way to do this in a static dropdown?

4 REPLIES 4
Jay-Encodian
Level: Powered On

Re: Custom connector: dropdown advanced options

Hey @Kol

How are you creating your endpoint for the connector? 

We typically use .Net Core Web APIs (C#)... if you're doing the same you should just be able to use an enum, the default JSON serialization would simply support this approach, your swagger defintion would simply contain something like. which flow would render has a drop down. 

"HorizontalAlignment": {
          "default": "Center",
          "enum": [
            "None",
            "Left",
            "Center",
            "Right",
            "Justify",
            "FullJustify"
          ],

HTH

Jay

varungore
Level: Powered On

Re: Custom connector: dropdown advanced options

Hi @Kol,

You may add following editor option extension to parameter properties to support your scenario:

{
	"name": "language",
	"in": "query",
	"required": false,
	"x-ms-summary": "Language",
	"type": "string",
	"default": "1",
	"enum": [
		"1",
		"2"
	],
	"x-ms-editor-options": {
		"items": [
			{
				"title": "English",
				"value": "1"
			},
			{
				"title": "French",
				"value": "2"
			}
		]
	}
}

 

varungore
Level: Powered On

Re: Custom connector: dropdown advanced options

 

Hi @Kol ,
You may use editor option extension as follows:

 

{
	"name": "language",
	"in": "query",
	"required": false,
	"x-ms-summary": "Language",
	"type": "string",
	"default": "1",
	"enum": [
		"1",
		"2"
	],
	"x-ms-editor-options": {
		"items": [
			{
				"title": "English",
				"value": "1"
			},
			{
				"title": "French",
				"value": "2"
			}
		]
	}
}

 

 

kolibrizas
Level: Power Up

Re: Custom connector: dropdown advanced options

Doesn't work with flag enableOpenApiConnection. If it is set to true, the titles are not being displayed, only the values.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 364 members 4,566 guests
Please welcome our newest community members: