Skip to main content
August 14, 2024
Question

How to get index of array type rule input

  • August 14, 2024
  • 6 replies
  • 0 views

Hi Experts,

I am using a grid layout and I have rule input of array type, I want to select data present at specific index in rule input, Please help  me how can I get index of array type rule input?

Thanks in advance.

    6 replies

    kumara0180
    August 14, 2024

    have you tried Index function example 

    index(ri!arrayType,n,null) where n is the position of the value in array

    mikes0011
    Brainy
    August 14, 2024
    using a grid layout and I have rule input of array type, I want to select data present at specific index in rule input

    Can you share a bit more detail about exactly what your input data is, and what you're trying to achieve with it (and why)?  Your question as-is is a bit vague and leaves a lot of room for interpretation or false starts.  Simply getting an arbitrary position in an array is super simple, i.e. "ri!array[2]" or "index(ri!array, 2, null())" if there's a possibility that ri!array might not have a [2], however it seems like you're getting at something more specific / more complex, and it's impossible to tell with the info given.

    August 15, 2024

    Thank you all for your responses, I will try to elaborate what I am trying to achieve.

    I have a local variable which stores multiple item(stored in record A) with its quantity selected by user, on the next page I want to show inventory(stored in record B) with required quantity to build item stored in local variable, in order to do so I need to compare item name with data stored in record B, I am trying to create rule input of Local variable in different page and then compare it with record type B(I am using grid Layout).

    Please help me weather my approach is correct? if correct how should I compare it?

    kumara0180
    August 15, 2024

    Do you have any relationship between these two records ? That could help you extract the information you are looking for. 

    you can use displayvalue function.

    docs.appian.com/.../fnc_conversion_displayvalue.html