Getting "Failed to enable constraints ..." error in a method because the "parent" data set table is empty

I’ve constructed a post-processing method against “GetMtlPartInfo” where I’m trying to override the cost field with the Std cost component IF it’s not zero (the part will be Avg costed but we want to quote to a std value). I’ve determined that my query is structured to work correctly except I’m getting “Failed to enable constraints …” error at the last step in the process. My best guess is that it is trying to update the ds.QuoteMtl table and the associated ds.QuoteAsm is empty based upon some displays and multiple test runs. My assumption is that I just need to somehow “prime” that table and then it will all work fine. Dilemma is how the heck to do it (lol). I’ve read up on using GetbyID but I’m thinking that’s for a db table and not the ds. I just want to get the ds table primed which is already within the functional activity and may not have been locked into the db. Anyone have the answer???

If you are only modifying a field already in the dataset, why is it triggering an error for missing records?
Can you share the code of the bpm?

image
image

The first display is of the key fields in the ds.QuoteMtl table (data is there)

image

The second display block indicates that the cost field is getting modified with my query BUT it appears to be concatenating the value instead of wiping it out!!! The value I see for the cost field is val1;val2. I then get the error message

image

I am not familiar with how exactly the widgets work, so it might be adding an entire extra row to QuoteMtl, instead of updating the existing one.

I would suggest just using a single custom code block, get the record you want to modify from the dataset already used by GetMtlPartInfo, update the single field and that’s it.

You could probably find several examples in this forum.