skearton Posted August 5, 2011 Posted August 5, 2011 Hi Gurus, Struggling with this one. I have a raw materials table, suppliers table and a join table between them of rawmtrlsupplier. While in raw materials table, user can add one or more suppliers for a particular raw material, and see this in a related portal. I have that working fine. In the portal of suppliers I have a field "rawmtrls_RAWMTRLSUPPLIER:: _MainSupplierID" with a checkbox set that has a value list of "1". It also has a button applied to it as shown below: Scripts: Set Default Supplier Set Error Capture [ On ] Set Field [ RawMtrls::_kf_DefaultSupplierID; rawmtrls_rawmtrlsupplier_SUPPLIER::__kp_SupplierID ] Refresh Window This works fine and I get the supplier ID that I want for other uses, but the issue I'm having is the checkbox does not display the checkmark. I do have a fill and line on the checkbox so I know that is not the issue. What am I missing here?
comment Posted August 5, 2011 Posted August 5, 2011 if the field is a button, you cannot enter it - so the script runs, but the field is not modified. I don't think you need this field anyway - you can use conditional formatting to indicate the main supplier.
skearton Posted August 5, 2011 Author Posted August 5, 2011 OK I finally figured it out! For those who read this thread looking for a similar answer it is this: I needed to add a calculation to the RAWMTRLSUPPLIER:: _MainSupplierID field. The calc is this: If (rawmtrls_rawmtrlsupplier_SUPPLIER::__kp_SupplierID = RawMtrls::_kf_DefaultSupplierID; 1; 0)
Recommended Posts
This topic is 4859 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now