Skip to main content
January 12, 2022
Question

Query Database Passing a parameter using IN Condition

  • January 12, 2022
  • 9 replies
  • 0 views

Hi All,

Did anyone tried passing the parameter as in condition for a query database smart service

For example : update tablename set status="test1" where case_id in ac!caseId

How to pass the case ID values of multiple and what is the type of the parameter for this?

    9 replies

    agamb0001
    January 12, 2022

    If you are using mysql, then you can use a query like:

    UPDATE tablename  SET status="test1" WHERE FIND_IN_SET(case_id, ac!caseId)

    and the ac!caseId can be set to:

    joinarray(pv!caseIds, ",") 

    where pv!caseIds can be your case id's (I assumed its of type number integer - multiple)

    harshavAuthor
    January 12, 2022

    Hi [mention:d8b421a354554ef089fa196070da6bf2:e9ed411860ed4f2ba0265705b8793d05] we tried like this and it didnt work for multiple values. can you help in any other way

    agamb0001
    January 12, 2022

    well, It worked for me for multiple values as well.

    Here are some screenshots of how I configured. 

    and I verified the table values were updated as well