difference between Property & index function?

What is the key difference between the property() & index() function?Can anybody tell?

  Discussion posts and replies are publicly visible

Parents
  • The Property() function is used for accessing fields or properties of a data type.

    The Index() function is used for retrieving elements from a list or array based on their position.

    For Example: 

    a!localVariables(
      local!employee: a!recordType(
        field1: "John",
        field2: "karthik"
      ),
      local!employeeList: {"Alice", "Bob", "Charlie"}
    ),
    a!section(
      a!textField(
        label: "First Name:",
        value: property!employee.field1
      ),
      a!textField(
        label: "Second Name:",
        value: index(local!employeeList, 1)
      )
    )

Reply
  • The Property() function is used for accessing fields or properties of a data type.

    The Index() function is used for retrieving elements from a list or array based on their position.

    For Example: 

    a!localVariables(
      local!employee: a!recordType(
        field1: "John",
        field2: "karthik"
      ),
      local!employeeList: {"Alice", "Bob", "Charlie"}
    ),
    a!section(
      a!textField(
        label: "First Name:",
        value: property!employee.field1
      ),
      a!textField(
        label: "Second Name:",
        value: index(local!employeeList, 1)
      )
    )

Children