Skip to main content
December 14, 2023
Question

Indexing a recordtype

  • December 14, 2023
  • 2 replies
  • 0 views

Hi All,

I have a scenario where i am getting details in a recordtype which is multiple.

Now i have to subsitute the record field value at a specific index  of a recordtyep in interface.

Is that possible as i am not seeing any option to index it.

    2 replies

    shikhat
    December 14, 2023

    Hi , 

    You can use index function to access particular value of record, then you can use substitute function

    Can you explain bit more what you are trying to achieve ?

    mikes0011
    Brainy
    December 14, 2023

    "index" means "position within an array" despite the common confusion around here caused by the "index()" function also being able to fetch a named property of a data type, meaning a lot of folks conflate the two things falsely. 

    However from the available context, I assume OP here is after the ability to index into a specific position in an array (true to the actual definition of "index"), which of course can be done both with the "index()" function as well as manually specifying an index in square brackets (local!myRecord[1], etc, which will work as long as the given number is guaranteed to exist in the given array lest it throw an error message).

    The Expression Guru