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 2054 posts 7103 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.

  • Comment author was deleted

    Oct 10, 2014 @ 08:27

    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

Please Sign in or register to post replies

Write your reply to:

Draft