You can output a shortcode from a shortcode and within that create an attribute value dynamically of course, but sharing a value from one shortcode triggered function call to another later in a page is presumably not possible.
Use javascript
.innerHTML
Use javascript .innerHTML to cause the content of something on the page to be changed once the page is loaded by the browser (which will occur after all of the shortcodes have done their thing server side).
function ()
Have your html output call a javascript function that will be created by another shortcode call, again occurring once the page is loaded by the browser (which will occur after all of the shortcodes have done their thing server side).