Create temporary object set/list to use in workshop

46 Views Asked by At

I want to create a temporary object set or list that I can use in workshop to manage a workflow in our project.There is an initial object set in workshop which is empty I want to pass this object to foundry function with some other parameters and then based on parameters single object will be created or updated in function and an updated object set with new or update object will be returned.

I have tried to create a function that takes some temporary object set as list of objects and other parameters.

@Function()
function myFunction(objectList: object[], id: string, name:string){
    if (objectList is empty){
        create new object and append in objectList
        I am creating new objects using Objects.create()
    } else if (based on id if object exist in objectList){
        update the object in objectList
    }
}

I am expecting a new object modified objectList that I can use in workshop but This function works fine in live preview but when I use this workshop I always get an empty object. I guess this is not working probably because the new objects that I create doesn't have an RID.

0

There are 0 best solutions below