Copied to clipboard

Flag this post as spam?

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


  • liran 58 posts 139 karma points
    22 days ago
    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

Please Sign in or register to post replies

Write your reply to:

Draft