Home > Forum > Data sources > Hyperlink from one dictionary A report row to dictionary B instance.

Hyperlink from one dictionary A report row to dictionary B instance.
0

Hi,
I have 2 dictionaries: Countries and Cities. In the Cities dictionary, the form field 'country' is a picker field from the Countries dictionary.I would like this field to become a hyperlink which would take me to the Country dictionary instance for that country. I was expecting this to work at least in the Dictionary report Cities but it doesn't.
For example when creating the Barcelona city instance in the Cities dictionary I selected Spain as a country. After saving I want to be able to click Spain and to be redirected to the instance Spain in the Country dictionary, just like that would happen with a normal process.
PS Checking the Hyperlink tickbox in the columns tab of the report does not work. I am always directed to the City instance.

MVP

Hi Roman,
When you are using Dictionary process - they use GUID next to (but more like instead of) ID - to allow export/import between environments.

So the dropdown field instead of storing ID#CommonName it's storing GUID#CommonName.

In version 2023 it's not possible to check 'Hyperlink' in the config, if the source is Dictionary.
I've tried to create custom source with elements in the dictionary process, but it ends up with creating url using GUID instead of ID.

https://webcon-instance/db/1/app/71/element/ba84040d-5466-47ee-8ba5-22d6ab6104fa/
instead of
https://webcon-instance/db/1/app/71/element/38523/

You could create Data Row attribute, with SQL query that returns this one element - it's ID to be precise, and configure it to act as link (see attached screenshot).
In my case S1 would be the field on City dictionary, linking to Country dictionary.

MVP
In reply to: Roman from Romania

Hi Maksymilian and thank you for your quick reply. Your solution did work and the ID is now working as a hyperlink on the City dictionary instance. But could you please tell why I cannot display it in the Cities dictionary report? Indeed the field, which is now a data row, is not available for selection.

Data Row attributes are SQL queries, so they are not possible to be displayed on a report by design (probably due to possible performance issues it could bring - nesting SQL statements).

You could change it to a regular attribute, and set it's value using form rules, or default value to the link.
Then it would be possible to display it on report, but it requires more thinking to make sure that the values will be always up to date.

Basics would be to create Form rule On change of Country attribute - calculate new url.
It seems like in this specific use case it should be enough, but there might be things i'm missing from whole picture, just like the fact that you might need to use it on report ;)

MVP

Hi Roman,

do you need the functionality to export/import the dictionary entries?

If this is not necessary, you can do the following:
1. Create a BPS Internal view for the Country dictionary.
2. Use the view for the Country field in the City dictionary
3. Make sure to use the workflow instance id and not the GUID as ID
4. Activate "Show link to selected workflow instance"
5. Add the field to the view and tick "Link"
6. Change the Display option to "Form field value link
7. The field in the view will provide a link to the source element (country).

Best regards,
Daniel