I want to create a table with requirements for a project.
\begin{table}[H]
\centering
\begin{tabularx}{\textwidth}{C{0.1}L{0.75}C{0.15}}
\toprule
\textbf{R\hyp{}ID} & \textbf{Requirement Description} & \textbf{Priority} \\
\midrule
R1 & Requirement 1 & 1 \\
R2 & Requirement 2 & 1 \\
\bottomrule
\end{tabularx}
\caption{Ziele}
\label{tab:goals}
\end{table}
What I wish to do now is, that the R1, R2 are labelled and can be referenced from the text with e.g. \cref{requirement-1}.
The command to create the R1 / R2 entries should be customizable: \uniqueReference{requirement}{R} where requirement would be the label prefix and R the text prefix.
\begin{table}[H]
\centering
\begin{tabularx}{\textwidth}{C{0.1}L{0.75}C{0.15}}
\toprule
\textbf{R\hyp{}ID} & \textbf{Requirement Description} & \textbf{Priority} \\
\midrule
\uniqueReference{requirement}{R} & Requirement 1 & 1 \\
\uniqueReference{requirement}{R} & Requirement 2 & 1 \\
\bottomrule
\end{tabularx}
\caption{Ziele}
\label{tab:goals}
\end{table}
Is there a package which does this already? Or would I have to create a custom command?