Saving collection objects in stream globals

Hello everyone,

I am trying to save some nested objects in stream globals. I just wanted to ask if the stream globals support collection objects like List?

if yes, I tried following to test :

//TESTS - Saving nested objects to stream globals
var account = AccountManager.GetDefaultAccount();

var myClient = new Client(account);

var streamsList = await myClient.StreamsGet(5);

var streamId = streamsList.FirstOrDefault().id;
            
var serverTransport = new ServerTransport(account,streamId);

var myObject = new Base();

myObject["items"] = new Project
{
     Name = "testProj",
      _id = Guid.NewGuid().ToString(),
      Phases = new List<Phase>
      {
            new Phase(1,"Phase1"),
            new Phase(2,"Phase2")     
       }
};

Output:

Cheers :slight_smile:
Baris

1 Like

Hey @Baris!!

Welcome to the community! If you haven’t already, feel free to Introduce yourself 🙆

So, sending and receiving globals should work with any nested objects using our SDK’s or any of the connectors that support them now (GH/Dynamo).

For the frontend, we wanted to keep the interface clean, so we only support creating (and visualising) “simpler” objects (Your data is still there, it’s just the web app doesn’t know what to do with it) :sweat_smile:

What’s your specific use-case? Would you need to access that data from the web-app? If not, sending/receiving those globals should work fine on GH and Dynamo.

Please let us know if it doesn’t! :smile:

2 Likes

Hi Alan,

Sending/Receiving globals works perfect!. Actually we don’t have to edit the globals here.I just wanted to ask if this is expected or is there something I missed :grinning_face_with_smiling_eyes: It would be just an another possibility to edit globals here directly on running projects (which is something we don’t really need).

Thanks!

1 Like