Skip to content

Dropdown of activity property in Custom Activity #1246

Answered by sfmskywalker
makattar asked this question in Q&A
Discussion options

You must be logged in to vote

You can achieve that by applying the "dropdown" UI hint. This is what the Send HTTP Request does:

/// <summary>
/// The HTTP method to use.
/// </summary>
[ActivityInput(
  UIHint = ActivityInputUIHints.Dropdown,
  Hint = "The HTTP method to use when making the request.",
  Options = new[] { "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD" },
  SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid }
)]
public string? Method { get; set; }

Notice that the Method property is of type string and that a finite set of options are provided from which the user can select one.
If you have a dynamic set of options that you want to provide at runtime, use the OptionsProvider

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@srihariraovadlani
Comment options

@makattar
Comment options

Answer selected by makattar
Comment options

You must be logged in to vote
5 replies
@sfmskywalker
Comment options

@makattar
Comment options

@makattar
Comment options

@sfmskywalker
Comment options

@makattar
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants