Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nicholas Westby 2005 posts 6843 karma points c-trib
    Oct 09, 2014 @ 19:30
    Nicholas Westby
    0

    Parse/Deserialize FieldSetting.FieldMapper Property Value?

    Is there some public way of parsing the value stored in a property like this (from a WorkflowType I'm making):

    [global::Umbraco.Forms.Core.Attributes.Setting("Field Values", description = "Enter field values", control = "Umbraco.Forms.Core.FieldSetting.FieldMapper")]
    public string FieldValues { get; set; }
    

    Here's an example value:

    Topic 1,eed644d7-c899-4777-a2bf-eba0fffa0f5e,;Topic 2,eed644d7-c899-4777-a2bf-eba0fffa0f5e,;
    

    I can see that it is delimited using commas and semicolons (side note: would be way better to use JSON or some format that allows for commas/semicolons to exist in the values without breaking the format). Seems easy enough to parse, but since you are parsing it to display in the workflow designer, I thought you might have exposed the parsing method publicly.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 10, 2014 @ 08:27
    Tim Geyssens
    0

    Hey Nicholas,

    In the upcoming version 4 release of Contour we are storing json for these complex field setting types which makes it a lot easier to work with and parse deserialize.

    In the version you are using it isn't json but just a custom string delimited with , and ; so not that friendly to parse

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies