Copied to clipboard

Flag this post as spam?

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


  • liran 59 posts 140 karma points
    Apr 18, 2021 @ 05:22
    liran
    0

    Get FieldType Value In Workflow

    hi all, umbraco forms... i added a typefield to custom type. i need to get this value in my workflow. i didn't find the method of doing this, please help....

    this is the code for the field:

            [Setting("Archive Code For Vaada", description = "Archive Code For Vaada", view = "TextField")]
        public string ArchiveCode { get; set; }
    

    this is the workflow part:

      case "File":
                                fieldValue = string.IsNullOrEmpty(record.RecordFields[new Guid(fieldMapping.Value)].ValuesAsString(false)) ? fieldMapping.StaticValue : record.RecordFields[new Guid(fieldMapping.Value)].ValuesAsString(false);
                                if (!string.IsNullOrEmpty(fieldValue))
                                {
                                    var formFieldObj = e.Form.AllFields.FirstOrDefault(x => x.Id == new Guid(fieldMapping.Value));
                                    string caption = formFieldObj.Caption.Replace("#", "");
                                    string dictionaryCaption = umbraco.library.GetDictionaryItem(caption);
                                    var name = string.IsNullOrEmpty(dictionaryCaption) ? caption : dictionaryCaption;
    
                                    filesValues.Add(new Bartech.Web.Models.RequestSubmit.FileUploadData() { Name = name, filePath = fieldValue });
                                }
                                break;
    

    thank you Liran

  • 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