Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Robert Lelieveld on March 22, 2017, 11:39:04 pm

Title: Create link based on tagged value
Post by: Robert Lelieveld on March 22, 2017, 11:39:04 pm
Hi,

Is there a way to generate a link using tagged values?

Something like this:
Link Text   {Element.valueOf(value1)}
Link Code  https://www.link.to/{Element.valueOf(value1)}

Inserting a hyperlink with the above value just create a hyperlink named '{Element.valueOf(value1)}' pointing to 'https://www.link.to/{Element.valueOf(value2)}'.
Ideally, when value1 is not set, the link is not created at all.

While browsing the forum, I noticed an option to link to elements using GUIDs.
However, no word on generating links like this.

How could this be accomplished?

Thanks!


Kind regards,
Robert
Title: Re: Create link based on tagged value
Post by: Robert Lelieveld on March 23, 2017, 02:31:48 am
Solved!

Found that this can be done by creating a SQL fragment and using the .Formatted option in combination with HTML code.
Nice.


Kind regards,
Robert
Title: Re: Create link based on tagged value
Post by: Paolo F Cantoni on March 23, 2017, 10:42:13 am
Can you post a worked example?

TIA,
Paolo