Dynamic Component OnClick with multiple lines

I am hitting an error when I use multi-line statements within an onClick behavior. My goal is to respond to a click by setting a sub-component instance’s name to a base name defined in the parent component plus a counter. For example, if the parent component name is

Athena

and the parent “CLIC” attribute starts out at 1, then when I click a sub-component instance, I want its name to be

Athena 1

and when I insert another child instance and click on that one, I want its name to be

Athena 2

etc. This will let me quickly insert a bunch of sub-component instances (using the nifty Place Component tool), then interact-click on each of them in succession and have them nicely named.

Now the bug (?). I my sub-component, I define the onClick behavior. This works:

set(parent!CLIC, Parent!CLIC + 1)

And this also works:

set(Name, CONCATENATE(Parent!Name, " ", Parent!CLIC))

But when I put them together in a single onClick, like this:

set(parent!CLIC, Parent!CLIC +1); set(Name, CONCATENATE(Parent!Name, " ", Parent!CLIC))

I get an error when I interact with the component:

ERROR: could not parse formula: CONCATENATE(Parent!Name, " ", Parent!CLIC)

However, if I simply reverse the order of the statements, like this:

set(Name, CONCATENATE(Parent!Name, " ", Parent!CLIC)); set(parent!CLIC, Parent!CLIC +1);

… it works fine.

Is this a bug?

no need to place Name in the onclick

internal name change.skp (20.6 KB)
internal name change 2017.skp (24.5 KB)