I thought you could do this now with the new Arcade capabilities, but I just tried and $dataSources isn't available in the text widget inside a list widget (it IS available when you have a stand-alone text widget, but that wouldn't do you any good). It looks like when you're using a list widget, everything has to be feature-based still.
I think you might be able to create a view as a workaround? Here's a tutorial showing (in part) how to group the unique values in a field. That way, you could have your layer of unique contract numbers automatically updated whenever the parent data changes, and then set the list widget to (I assume) do something upon selection based on the matching contract number.
Hey @MauroAndinoNavarro maybe you can go back into this post and edit the title? " .. " is kinda hard to figure out