my guess is that you hide the fields on portal rows, but not the portal himself. Please check if on the portal you add a hide condition. Hiding the portal will hide also everything it contains.
Thank you for the reply.
The problem here is that FM behaves differently onLoad (pic1) from afterChoosing (pic3), whilst having in both cases $$modifying set to "" (void). Hide condition: isEpmty ( $$modifying).
Has it something to do with the style I use on active portal record (blue rectangle)?
In your original post, what do you mean by On format load ? When a Hide condition is changed, the object that has this condition will not necessarily re-evaluate the condition. To be sure it will, you may refresh the object, that will force it to evaluate the Hide if calculation and hide the object if the condition is met. What bugs me is that a Refresh Window should refresh all objects within.
You don't tell what version you are running, but along the time bugs were corrected with portals.
- script voids $$modifying, loads format and refreshes ==> result pic1: no portal, just text with green background that has no hide condition )
- click on button (pic2 'clicked' while in pic1) calls a script that sets $$modifying to "Y" and refreshes ==> result pic2: portal with data and some text without background; i.e. the hide condition isEmpty ($$modifying) is interpreted correctly by FM
- click on a record in the portal calls a script that voids $$modifying and refreshes ==> pic3 which should be as in pic1.
In case of a hide condition for portal and fields, fields are hidden, portal not (should hide both).
In case or a hide condition just for the portal, fields and portal are shown.
Fields *are* in the portal row, otherwise they wouldn't be visible correclty.
There's no layout change in the the scripts.
FMPro Adv 15.01
I am puzzled. Since you have FMPA, I would suggest using the debugger to see if step by step would produce a different result. Do you have conditional formatting on the portal or the fields in it ?
FMPro Adv 15.01
Note that the current version if 15.03. Perhaps some of the updates would affect your design?
I'm asking the community after having checked with debugger as there are no errors: data from portal correctly transferred to fields on the left side (in pic2 I choose the first record and you can see the the data in the fourth field left and as the first two characters in the 8th field left.
There's a conditional formatting of the fields but the formula result is "not true" for all the records in the portal.
In the meantime I've tested excluding active portal row highlighting (blue border), but still the portal shows like in pic3 after choosing in pic2.
The layout is in a popover that has a onClosing Trigger checking if there's an open popover and inhibits the load of other layouts, etc. if so.
Hi and thanks.
I've checked the changes from .01 to .02 and .03 but did not see anything referred to this strange behaviour as the global variable in hide formula has same value in pic1 and pic3.
Please set up a small demo file that has this behavior and share it here so we can take a look at it.
The object just above the portal is hidden in picture 1 and 3. Assign the same Hide Object that you have assigned to this object to the portal. You do not need to hide the fields in the portal if the portal is hidden.
Hi and thanks to all!
Following screenshots of hide conditions and script steps (sorry it's in Italian).
$$modcod is set to "" unconditionally at top of script.
Hide condition 01:
Hide condition 02:
Script steps on popover load (button in 2nd pic, my 1st msg):
Script steps after click on record in portal:
Hope it's more clear.
Just solved (after a hint from Giulio Villani in the Italian FileMaker Guru site):
I inserted a "Save record" before "Refresh Window" in the second script part (4th picture of my last msg) and hiding is correct.
FYI, popover is in a list format with automatic saving (?!?)
Thanks for your time.