Author Topic: Edit Hyperlink in Element Note  (Read 3851 times)

David Rains (bioform)

  • EA User
  • **
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Edit Hyperlink in Element Note
« on: October 17, 2016, 10:56:33 pm »
How can you edit an embedded hyperlink to a selected element (e.g., the element's name has changed and the hyperlink's text is no longer correct?)
BTW: We have been asking about the automatic update of the hyperlinl's text for quite sometime... is this even being considered? Or is there a script workaround?

« Last Edit: October 17, 2016, 11:01:59 pm by David Rains »

PeterHeintz

  • EA User
  • **
  • Posts: 901
  • Karma: +55/-18
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #1 on: October 17, 2016, 11:21:39 pm »
AFAIK this is not really possible.

You can use the context menu  “Edit Hyperlink” feature, but to get the name updated you have to switch the element somehow (more or less the same as delete/add).

From my point of view, the hyperlink should be always updated to the current name of the item it links to, especially because in the current implementation you have no choice to use something else as link name.
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 12729
  • Karma: +361/-295
  • I'm no guru at all
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #2 on: October 18, 2016, 01:00:03 am »
One of those half-baken concepts EA has been flooded with. Falls in the same category as text formatting in notes.

I guess it should be possible to aid this with a script. But that can not run completely automatically. You need to provide old an new name and foster the notes for the links. I seem to remember having dealt with links in notes and how to retrieve them, but unfortunately I can't recall any details. Repository.GetFieldFromFormat  is probably the right starting point.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7707
  • Karma: +101/-18
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #3 on: October 18, 2016, 11:02:21 am »
The reason why there isn't any automatic update of referenced names on hyperlinks to elements is that on any non-trivial database it will be prohibitively slow, and would need to be executed with every name change. You can't index based on the presence of a hyperlink in a note, which means the DB has to do a full search of all notes every time just to find out if anything needs updating.
Eve

support@sparxsystems.com

PeterHeintz

  • EA User
  • **
  • Posts: 901
  • Karma: +55/-18
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #4 on: October 18, 2016, 07:35:27 pm »
In my (maybe naive idea) the stored hyperlink in the text already presumably has the GUID of the element, because it even works when the name of the referred element is changed.
So for me, it means that the view (notes box) just need to find out the name of the guid before shown/used, or an open text box view need to be refreshed once the name is changed.
This is what you probably do in any diagram , and for me it is implausible that this can be done for diagrams but not for text boxes.
Best regards,

Peter Heintz

skiwi

  • EA Practitioner
  • ***
  • Posts: 1967
  • Karma: +43/-82
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #5 on: March 29, 2017, 07:21:34 am »
You may find this illuminating

Notes enhancements
Orthogonality rules
Using EA15.2 (1555) on Windows 10 Enterprise/64 bit. Repositories in SQLServer2019 & Access2003/JET4.0. WebEA on Pro Cloud Server 4.2.64

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8133
  • Karma: +228/-128
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Edit Hyperlink in Element Note
« Reply #6 on: March 29, 2017, 10:52:38 am »
In my (maybe naive idea) the stored hyperlink in the text already presumably has the GUID of the element, because it even works when the name of the referred element is changed.
So for me, it means that the view (notes box) just need to find out the name of the guid before shown/used, or an open text box view need to be refreshed once the name is changed.
This is what you probably do in any diagram , and for me it is implausible that this can be done for diagrams but not for text boxes.
It's not that simple Peter.

The hyperlink consists of two parts (as you know), the reference and the text to be displayed.  You (not EA) control the displayed text - even if you accept the default value.  Once you've done that, you've, effectively, taken a snapshot.  Perhaps if Sparx allowed an escape to say: "always return the current name"   (or even some other property!) of the target then you might get what you want.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!