Access FileDrop custom form fields in actionScript

Discussion in 'ActionScripts' started by Gary Schultz, Jan 23, 2025.

  1. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    24
    Likes Received:
    3
    I was not sure where to create this post.

    We have created custom fields in a system FileDrop based on the following article.

    Filedrop Custom Fields | LiquidFiles Documentation

    We have an actionscript that captures the file drop information and sends it to another process. We want to capture the custom field values in the actionscript. I do not see any examples of how to capture the FileDrop custom field values. Is it possible to capture the FileDrop custom field values?
     
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    814
    Likes Received:
    32
    Not directly. The custom fields are merged into the main message body like:
    Code:
    Custom filed: filled text
    Other filed: filled text
    
    message body text
    When the message is sent to the Action script the information from the custom fields would have to be parsed from message variable in the script.
     
  3. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    24
    Likes Received:
    3
    OK. I didn't the fields in the message in the activity log, so I wasn't sure if this is possible. I will try to access the field in the script.
     
  4. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    814
    Likes Received:
    32
    The custom fields are not in individually logged in the Activity logs.
    In the Action script I would try to read the message body stored in the "message" variable.
    Then parse the custom fields strings i.e. with grep, sed, awk depends which scripting language you are using.
     
  5. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    24
    Likes Received:
    3
    Thanks for the info. Unfortunately I have limited time to spend on this so unless there is a quick way to do this I have to move onto other tasks. We are not going to present filedrop custom fields as an option to our internal users.
     
  6. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    24
    Likes Received:
    3
    I figured it out. I figured out how to get the message in the action script and add to the JSON. In my use case I'm processing the message value in Logic Apps. Once I saw how the message is delivered using <br> to separate the message values I performed a split on <br> on the message value to create an array. I then pulled the need values from the array.
     
    David M likes this.

Share This Page