Skip to main content
Mar 18, 2025 9:23 AM UTC
Solved

Dynamic properties names

Hi,

Is it possible to concatenate strings to call a propertie.

Something like that

 textarea: {
text: '{{=parent.CONCATENATE("out",ASSTRING(@i))}}',
name: 't1',
editable: true,
style: { 'color': "#000000" }
}

I want to assigne to each textarea the propertie out1, out2 etc. based on the index @i

 

I found a way to make it works using IF statement, but it’s not ideal :

{{=IFERROR(IFS(@i=1,parent."in1",@i=2,parent."in2",@i=3,parent."in3",@i=4,parent."in4",@i=5,parent."in5"), "error")}}

Thanks for your help

Nathan Kim
Lucid product team
Mar 20, 2025 7:23 PM UTC

Hello NM!

While it would be useful to directly concatenate to form a property name within a text area, here is another idea that I have.

You could get parts of the names (as strings) and concatenate them to a longer string. Then you could use that longer string as a property name, by passing it to the GET formula, along with the parent shape object.
For example, something like this may work:
```
"text": "{{=GET(PARENT, CONCATENATE(\"out\", @i))}}",
```

If this doesn’t work for you, I can try to modify this for your specific use case. If you have any questions about it, please let me know -- thank you!

-Nathan

Comments

Humas1985
Lucid Legend Level 10
Lucid Legend Level 10
Mar 19, 2025 5:43 PM UTC

Hi ​@NMN 

While the current functionality doesn't support dynamic concatenation of property names within the textarea, leveraging data linking or scripting can offer more scalable solutions for the scenario.

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

 

Translate
Huma || Lucid Legend
Nathan Kim
Lucid product team
Mar 19, 2025 8:59 PM UTC

Hello NM,

As a workaround, you can concatenate text and formula results, within the template string. For example, for your case, you can do something like
```
text: ‘out{{=@i}}’,
```
to wrap the text and index together.


If this doesn’t work for your use case, let me know! Other workarounds might be possible, and I’m happy to discuss them.

Thanks,

-Nathan

Translate
NMNAuthor
Mar 20, 2025 9:44 AM UTC

Hello Nathan,

I need to display the value of the property ‘parent.out1’, not just its name.

If you have other ideas, great! It seems that Humas thinks it’s not possible to do for now.

Thanks again,

NM

 

 

 

Translate
Nathan Kim
Lucid product team
Mar 20, 2025 7:23 PM UTC

Hello NM!

While it would be useful to directly concatenate to form a property name within a text area, here is another idea that I have.

You could get parts of the names (as strings) and concatenate them to a longer string. Then you could use that longer string as a property name, by passing it to the GET formula, along with the parent shape object.
For example, something like this may work:
```
"text": "{{=GET(PARENT, CONCATENATE(\"out\", @i))}}",
```

If this doesn’t work for you, I can try to modify this for your specific use case. If you have any questions about it, please let me know -- thank you!

-Nathan

Translate
NMNAuthor
Mar 21, 2025 10:48 AM UTC

Hello Nathan,

It’s working great ! The Get formula was the missing element.

Thanks a lot,

NM

Translate