Datalink in AWS managed grafana

Hello
I would like to build a bar gauge to use the datalink capabilities.
However, in AWS-managed Grafan, the dashboards url contains an UID. Up to know the only way I see to get this UID as a variable is to integrate it in the query as a third field.
By this way, I can use the AWS UID in the URL link to the other dashboards but this is a problem for displaying names of each bar as I get the related value name (2nd field - as expected ) but concatenated with this UID (3rd field)
Any way to be able to build the datalink in the AWS environment without having the dashboard UID selected in the query ?
Thanks.