Skip to main content
New Participant
December 3, 2024
Question

how to use a record picker with a read only grid filter

  • December 3, 2024
  • 5 replies
  • 9 views

Hello, all

I have been requested to use the record picker component and use the selected records in the picker  to filter out the records (by identifier) in a read only grid.  The record picker returns a list of variant and I need a list of integer in order to use the filter in the grid, otherwise it will return an incompatible type error.

Is there any way this can be done ?

the local!selectedApprovalID does return the values I am looking for, but I am getting an error : 

" Cannot apply operator [IN] to field [approvalId] when comparing to value [TypedValue[it=197,v={TypedValue[it=1,v=12],TypedValue[it=1,v=23]}]]."

There was an answered question in this forum to use the index() function, but that also returns the same error.

Please help,  

been stuck with this issue for some hours now.

Thanks.

    5 replies

    stefanhelzle0001
    Brainy
    December 3, 2024

    Did you try to use the tointeger() function to turn that list into numbers?

    New Participant
    December 4, 2024

    no, that did not work. 

    sandhyab4212
    Known Participant
    December 4, 2024

    Hi [mention:6debae1f16f44f118c6fbab8146b909c:e9ed411860ed4f2ba0265705b8793d05] 

    In the value parameter of a query filter, include array to the local variable i.e., { local!selectedApprovalId }, try it once

    gayatria0439
    Participating Frequently
    December 4, 2024

    Hi [mention:6debae1f16f44f118c6fbab8146b909c:e9ed411860ed4f2ba0265705b8793d05] , Try to do like this

    New Participant
    December 4, 2024

    thanks gayatria0439, this may have worked. but instead I solved using a cast function, which in principle can do the same thing.

    Thanks for the suggestions to all.