I have an object, “employeeRecord” that has many properties. I can access these in data bindings and other places using notation like employeeRecord.address, employeeRecord.city, etc.
In the block above though, my Set Property In blocks are not consistently overwriting the existing properties. Sometimes they are creating new properties instead. See employeeRecord.googleFormattedAddress, .googlePlaceId, and .zipcode as an example.
Can you help me understand why this happens? I can work around this using Get Property Of blocks but it’ll be good to know when the . notation can work.
Could I have created a variable called “employeeRecord”, gave it the value of Get Property “employeeRecord” of “formEditProfile” Data, and then just used that in the “Set Property In” field of each block? (Just to reduce the get property of calls and make it a bit more readable)
Is there a more elegant way to handle a situation like this where I have the same block repeating over and over again but there’s a slight difference each time? I think I might have been able to use a custom function but I don’t quite see how to set it up so that it gets the different ‘contains item’ string each time.
Thanks @Dima . I think this solution could work for the questions I had in the follow-on reply. I will be mainly interested in using the codeless approach. Can you point me to where the “Set _____ to” block is located? The one where you use for “set nestedObject to” and “set nestedProp to”. I am unfamiliar with those and can’t find them in the codeless blocks.
@vladimir-upirov the first message in this thread is the other example of the behavior I sent over in slack.