Skip to main content
September 26, 2024
Solved

Fetch list of text from given text

  • September 26, 2024
  • 4 replies
  • 0 views

How Can I fetch the List of value as a text string from the given List

    Best answer by tejasn0320

    You have to index with the Reference type of ASQ Reference Data type 

    If record type

    asq reference data. field.id 

    or if its cdt

    asq reference data.id

    4 replies

    sriramk5349
    September 26, 2024

    Use Index function -> index() Function - Appian 24.3

    September 26, 2024

    Yes that was my first try, I used Index(local!variable,"id",null)
    **Local!variable to store output
    But there is no match for Id

    tejasn0320
    September 26, 2024

    You have to index with the Reference type of ASQ Reference Data type 

    If record type

    asq reference data. field.id 

    or if its cdt

    asq reference data.id

    mikes0011
    Brainy
    September 26, 2024

    simple - for plain dictionary or CDT data, as tejas mentioned, 2 options:
    1) just reference the properties with dot-property, i.e. "local!myData.value",
    2) use property() function, i.e. property(local!myData, "value", {}).  (note: index() does the same thing, but i insist on property() for getting properties for code readability)

    more deluxe: iterate over the values and return whatever property you want (helpfully you can use this to do looped transformations easily if you want):

    a!forEach(
      local!myData,
      upper(fv!item.value)  /* wrapping in "upper()" here just as a simple example of doing a row-by-row transform inside a!forEach() loop */
    )

    If the data type is RecordType data, you can use similar to the above approaches, but instead of naming the property desired as plaintext, you'll need to pass a recordType reference to the field you want, i.e. "recordType!ASQ Reference Data.fields.value" (this would render as the actual field reference itself for you in Appian when done correctly), and this can be done for direct accessing the properties and also used in the property() function.