Skip to main content
New Participant
November 24, 2022
Solved

Index record type with condition

How to index department from one of the index where empId is same as loggedin user Id.

here allUsers stores Record data.

    amans0009
    amans0009Answer
    Participating Frequently
    November 24, 2022

    you can query the data based on loggedin user details from which you can find logged in user id and then
    find the indexes where these id exists , and extract the department from the indexes
    take reference from this code

      index(local!allUsers[recordType!yourRecord.field.department],wherecontains(local!loggedInUserId,local!allUsers[recordType!yourRecord.field.empid]),{})
      

    1 reply

    amans0009
    amans0009Answer
    Participating Frequently
    November 24, 2022

    you can query the data based on loggedin user details from which you can find logged in user id and then
    find the indexes where these id exists , and extract the department from the indexes
    take reference from this code

      index(local!allUsers[recordType!yourRecord.field.department],wherecontains(local!loggedInUserId,local!allUsers[recordType!yourRecord.field.empid]),{})