Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-18360

Dynamic field access functions for variant

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: rel-5-7-0
    • Component/s: Engine
    • Security Level: Users (General product issues)
    • Story Points:
      3
    • QA Testing:
      UNDECIDED
    • Epic Link:
    • Sprint:
      Green Sprint 109, Green Sprint 110, Green Sprint 111, Green Sprint 112

      Description

      • function variant getValue(<record> rec, <string> fieldName)
      • function variant getValue(<record> rec, <integer> fieldNumber)
        Returns the value of the specified field (either by name or number) of specified record. The returned value is of type variant - i.e. Java’s Object - the result of calling getFieldValue() on the record at Java level.
        Example:
        getValue(myrec, "name");
        getValue(myrec, 3);
        
      • function void setValue(<record> rec, <string> fieldName, <variant> value)
      • function void setValue(<record> rec, <integer> fieldNumber, <variant> value)
        Sets the value of the specified field (either by name or number) of the specified record. If the variant value is not of a proper type for the data field, runtime exception is raised (can be handled in try-catch block)
        Example:
        variant value = "ABC";  // it’s string now
        setValue(myrec, "name", value);
        value = 10; // it’s integer now
        setValue(myrec, 3, value);
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              slamam Martin Slama
              Reporter:
              krivanekm Milan Krivanek
              Votes:
              0 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 - 10 minutes
                  10m