You'll need to modify the first action in the rule (from the screenshot you included above). Right now you have:
Next_Estimate = concat("<query...
But you need
queryxml = concat("<query...
Where queryxml is a node in the secondary data source you created to query the database (NextEstimateNumber).