Home > Forum > Plugins > SDK configuration with a dynamic grid

SDK configuration with a dynamic grid
0

MVP

I have the challenge to read form fields of a pdf document and store them in the workflow instance.
The idea is, to implement an sdk custom action, where I am able to configure a mapping between the pdf form fields and fields of the workflow instance.

The ideal solution is having two columns in a dynamic grid (similar as in the image attached), where i am able to add as many rows as i need. One to define a name of the form field (text) and another to pick from my workflow fields.
I found some classes like ConfigEditableGrid, ConfigEditableGridColumn in the SDK, but I'm missing samples how to use them.

Does anybody have experience with this type of configuration?

MVP

I had some problems with this one too. :)
Once you know how to use them it's fairly easy

Create a class where each property is one column.

public class Mapping
{
[ConfigEditableGridColumn(DisplayName = "Target column", Description = "DB name of target item list column.", IsRequired = true)]
public string SourceColName { get; set; }

[ConfigEditableGridColumn(DisplayName = "Target value", Description = "The value which will be written to the column.")]
public string Value { get; set; }

[ConfigEditableGridColumn(DisplayName = "Target value type", Description = "The target type of the value.Boolean = 0Choose = 10DateTime = 20Decimal = 30Text = 40Picker = 50", IsRequired = true, DescriptionAsHTML = true)]
public string Type { get; set; }


}

Afterwards add a property to the PluginConfiguration with type List:
[ConfigEditableGrid(DisplayName = "New values")]
public List Mapping { get; set; }

In you logic you can easily iterate through the "rows" of your grid
foreach (var mapping in Configuration.SourceConfiguration.Mapping)
{}

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.