Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23605

Unable to access properties of document in a list from automation scripting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.2
    • Fix Version/s: 9.3
    • Component/s: Automation

      Description

      If an Automation Script is configured to accept documents as the input, I am unable to access properties of individual documents without calling getPropertyValue(). For example, this does not work:

        var creator = input[0]['dc:creator'];
      

      But this does work:

        var creator = input[0].getPropertyValue('dc:creator');
      

      If, on the other hand, I call an Automation Script that is configured to accept document both examples work as expected (removing the array accessor of course).

      I will provide a reproducible example.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h