Codeless - Object - Assign Object Properties

In Codeless - Object , what does “Assign Object Properties” do?
image

I did check the documentation but wasn’t able to find a description and the tutorial video on Objects just says “we’ll skip this one for now”.

The reason I am asking is because I am looking for a way to, in one step, create an object, set some properties, then pass it on to something else as an argument. The problem with “Set property in” is that it does not allow returning of the updated object, so I am having to define a variable, leading to several lines of code. I am hoping that “Assign Object Properties” can do this in one line.
image

Hello @JohnP

what does “Assign Object Properties” do?

This block copies all properties from the source into the target.

Unfortunately, I do not clearly understand what you are trying to achieve. If you still want some help, please create a test page with logic that you try to make shorter, and we will try to help you.

Regards, Dima.

Hi JohnP,

Here’s a video where I review the Assign Object Properties block:

The video is a part of the Codeless Programming Course:

If you need the functionality where Set property in returns the modified object, it can be easily accomplished with a custom function:

Regards,
Mark

that makes sense, thanks Dima!

Below is the logic I am trying to make shorter. I simply want to supply { meetup: null } as the change that my Bulk Update should make. But first I am having to create the variable meetupNull, create an object with propname “meetup”, then set this property to “null”, before i can do that. I am sure there is a one-line way to create an object, I just don’t know how!

How about this?:
image

omg, ha! That is the one-liner I was looking for, thankyou! :smiling_face:

In “Create Object” I thought “propName” was fixed and I had to supply the name of the property. I didn’t realize “propName” could be edited to the actual name of my property, to which I could then supply the value.

1 Like