Skip to main content
November 1, 2022
Solved

Only return integer from list of map value

  • November 1, 2022
  • 4 replies
  • 0 views

I have the above expression rule, and when I call it in my interface I am getting the value of [ID:7]. Is there a way to only return the integer value of 7? I'm sure this is probably an easy fix, I'm just very new to this

    Best answer by mikes0011
    index function

    This will work, however, I personally recommend that when fetching a property (i.e. the "ID" property of this record type), as opposed to an index (being the term for the position of a data item within an array), we should use the property() function instead of index(), if just for readability and code consistency, even though both functions allegedly act identically behind-the-scenes.

    4 replies

    amans0009
    November 1, 2022

    wrap this into an index function

    index(a!query(your-query).data,"ID",{})

    November 1, 2022

    thank you so much!