Skip to content

JSON Field Expressions in v3 #6184

Closed Answered by Nekrosis1
adamfisher asked this question in Q&A
Discussion options

You must be logged in to vote

Elsa variables, inputs and outputs are generally ExpandoObjects behind the scenes, so instead of passing in the array as stringified, which results in a string, you might want to try to pass in your list as
return ["00.Comms", "01.Sales"];
and use
public Input<List<string>> SalesFolderNames { get; set; } = default!;
as your input in your activity.
if you wish to pass in more complex objects, which you have a model for, you can define the input as
public Input<object> SalesFolderNames { get; set; } = default!;
or
public Input<List<object>> SalesFolderNames { get; set; } = default!;
you can then do something like

if (context.Get(SalesFolderNames)  is SalesFolderModel salesFolderModel)
{
..…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adamfisher
Comment options

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