removing an element from an array passed into a function

Options
i am passing an array to a function. Inside the function i want to remove a particular item from the array and then pass it back. There is more logic to it but in essence. I am trying to use update variable with remove filter but that only shows me those variables defined locally to use for the array. I need to use the input array which is not shown in the drop down var selector. I don't want to duplicate the entire array in a local array variable. What are my options

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     update variable only works if you have a variable to update. Alternatively, you could use create variable and apply the remove filter there to do it in one step. 
  • mohan ramanujam
    Options
     do i then have to replicate the input array into the locally created variable. If so what is the easiest way to replicate. It would seem to be wasteful as i really wanted to filter the input variable.
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    No... You just need to select the input as the value for the variable and apply the filter to it:
    [CleanShot 2022-10-05 at 13.51.53.png]
  • mohan ramanujam
    Options
     I am getting null arrays in my create variable with remove. Please see following two screenshots
    [FireShot Capture 173 - Xano - api2.zwsociety.com.png][FireShot Capture 174 - Xano - api2.zwsociety.com.png]
  • mohan ramanujam
    Options
     any tips on why null array is happening on the create variable (see above)