More troubles in the same area. Invisibility does not appear to work in subform TableViews. Works OK in from view.
I have a global value that toggles when ORDERS form is ISNEW or UPDATE. Value is "Ordering" or "Receiving"
ORDERS has a subform that toggles Visibility and ReadOnly of some elements based on global value.
When the ORDERS form is at ISNEW, the subform elements that should be invisible are showing along with all other elements for data entry. And items that should be ReadOnly cannot be accessed.
Code from ORDERS form: On Form Entry
Quote:IF @UPDATE THEN {
GlobalValue("gvalStatus","Receiving")
}
IF @ISNEW THEN {
GlobalValue("gvalStatus","Ordering")
}
From DETAILS Subform: On Form Entry
Quote://=====================================
IF @GlobalValue("gvalStatus") = "Ordering" THEN {
//Make fields invisible when ADDing records.
Visibility(QtyReceived,0)
Visibility(UmRecv,0)
Visibility(RecvUnitPrice,0)
Visibility(DateReceived,0)
Visibility(AmountPayable,0)
Visibility(PODate,0)
Visibility(Status,0)
Visibility(PromiseDate,0)
}
IF @GlobalValue("gvalStatus") = "Receiving" THEN {
//Make fields visible when RECEIVing records.
//Make fields ReadOnly when RECEIVing records
Visibility(QtyReceived,1)
Visibility(UmRecv,1)
Visibility(RecvUnitPrice,1)
Visibility(DateReceived,1)
Visibility(AmountPayable,1)
Visibility(PODate,1)
Visibility(Status,1)
Visibility(PromiseDate,1)
ReadOnly(HHPartNumber,1)
ReadOnly(Qty,1)
ReadOnly(DueDate,1)
}
Using the Global Manager,I can check the value of the GlobalValue, go to Preview mode, and open up the subform directly. If status is "Ordering" the form looks like status is "Ordering", the desired fields are invisible.
If I change the Subform view from Table to Form, the correct layout is there,
But if Subform is in Table View, then it behaves like "Receiving", and showing me fields that should be invisible locks me out of fields for Data Entry because of Read Only.
And you can see the Status is "Ordering" in a msgbox I provided to help troubleshoot
I believe that the programming is correct. I think that this is probably a real error to be corrected. (using 1.0.5Beta)