I’m trying to set the Contract ID field for an updateable dashboard. In the Job entry screen, when you uncheck the link to contract box, the contract ID is cleared out, and when you check it, it adds the contract ID that is in the job head. When I do that with the UD dashboard, the Contract ID is not cleared (or added), so I need to recreate that behavior. What’s the best way to do that? If I add the JobMtl.ContractID field in the query, there is the option for the query for object column mapping and I can put in a mapping using C#. I suck at C# so that’s tough for me, and there’s not helpful conditions like there are in other places. Would it be better for me to make a calculated field so I can use the SQL editor, and map to the calculated field? Or will just look at the existing field instead of the changed field?
Basically this is what I need, but it has to be based on what the link to contract field is being changed to.
(case when JobMtl.LinkToContract = true then JobHead.ContractID else '' end)
It would be nice if I could add a data directive, however I don’t think I can easily grab the JobHead contractID when I’m working with JobMtl table.
I’ll play around with it and do some trial and error. But if anyone has any tips, that would be awesome.