While overwriting in Server Action

Here’s the custom formatter function:

function formatter_concatarr($arr1, $arr2){
    if(!is_array($arr1)){ $arr1 = array();} 
    if(!is_array($arr2)){ $arr2 = array();}
    $retval = array_merge($arr1,$arr2); 
return $retval; }

This is my server action file:

(note: each of the set values has a local and global name. It is the global one I will use)

I end up with one set of results (all pages of retrieved data) in an output value called items

Mine is not a Google call so you will need to adjust the pagination reference to the nextPageToken etc. but the sructure should get you closer to what you want

1 Like