Need to remove value in array

Hi ,

 

I want to remove respective value from one array but i am getting some error.

local!testName:union(index(
local!fullsubset.data,
"testName",
null
),
index(
local!fullsubset.data,
"testName",
null
)
),

local!testName- its containing list of test name.

a!textField(remove(local!testName,index(local!testName,wherecontains({"test_only"},tostring(local!testName))))),- returning all value without remove

a!textField(wherecontains({"test_only"},tostring(local!testName))) - Returning blank value

a!textField(index(local!roleName,wherecontains(cons!RAS_RISK_TYPE_OF_TEST_ONLY_SEGMENT,toString(local!roleName)))) - Returning blank value

 

Kindly help me what i am missing ?

  Discussion posts and replies are publicly visible

  • Hi

    tostring : returns only string

    touniformstring ; returns list of string

    please use touniformstring

     

    a!textField(remove(local!testName,index(local!testName,wherecontains({"test_only"},tostring(local!testName))))), - wrong

    a!textField(

      remove(

          local!testName,

          wherecontains("test_only",touniformstring(local!testName))

       )

    )

    _______________________________________________________________________________

    a!textField(wherecontains({"test_only"},tostring(local!testName))) - Returning blank value

    a!textField(

        wherecontains("test_only",touniformstring(local!testName))

    )

    _______________________________________________________________________________

     

    a!textField(index(local!roleName,wherecontains(cons!RAS_RISK_TYPE_OF_TEST_ONLY_SEGMENT,toString(local!roleName)))) - Returning blank value

    a!textField(

         index(

               local!roleName,

               wherecontains(

                   cons!RAS_RISK_TYPE_OF_TEST_ONLY_SEGMENT,

                   touniformstring(local!roleName)

              )

        )

    )

  • Please use touniformstring() instead of tostring() if there is comparison between text array..
  • +1
    Certified Lead Developer
    Hi make sure to perform a null check before executing remove() else this might throw an error