Dropdown of activity property in Custom Activity #1246
-
Hi , |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You can achieve that by applying the /// <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 For example: [ActivityInput(
UIHint = ActivityInputUIHints.Dropdown,
Hint = "The HTTP method to use when making the request.",
OptionsProvider = typeof(MyOptionsProvider),
SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid }
)]
public string? Method { get; set; }
public class MyOptionsProvider : IActivityPropertyOptionsProvider
{
public object GetOptions(PropertyInfo property) => new[] { "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD" };
} |
Beta Was this translation helpful? Give feedback.
-
Can you please tell me in which namespace ActivityInput Resides.Intellisense not giving any suggestions there. |
Beta Was this translation helpful? Give feedback.
You can achieve that by applying the
"dropdown"
UI hint. This is what the Send HTTP Request does:Notice that the
Method
property is of typestring
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
…