2 Replies Latest reply on Aug 3, 2015 9:01 AM by NicholasWelander

    Conditional visibility in related record

    NicholasWelander

      Title

      Conditional visibility in related record

      Post

      This is a decently complex situation to map out, but I'll do my best.

      I have 3 tables, Table1 --|------|-|-- Table2 --|-------|-|-- Table3

      The layout is based on Table1 and I have Table2 records in a portal. I can select a record in Table2, which sets the field Table1::id.table2selected to Table2_PK so I can see details about the Table2 record via the relationship, Table1_Table2_selected.

      There is also a portal showing Table3 records based on the selected Table2 records, via the relationship, Table1_Table2_selected_Table3.

      This portal has a popover in each record which hides different Table2 fields based on a condition in Table3.

      The issue is that some of these fields hide when they are in focus. For example, I've opened the popover on a Table3 record with table3::condition = 1. It shows a field, Table1_Table2_selected::field. This field is hidden when Table1_Table2_selected_Table3::condition ≠ 1, therefore it is visible. When I click it, it disappears, however the other items in the popover (which have the same visibility condition) do not.

      I can see how it would make sense because the focus is now on Table1_Table2_selected::field, but the Table3 portal row should still be active. What makes this more unusual is that it doesn't do this with every field and it never did this in FM13 (I've recently upgraded to 14).

      Has anyone experienced this or have any idea what I'm talking about?

        • 1. Re: Conditional visibility in related record
          philmodjunk

          When I click it, it disappears,

          Why would that be? Is it set up as a button to perform a script that changes the value of the field?

          It's pretty difficult to follow all the details of your description here. As an example, there are times when you write something like "This Portal..." and it's tricky to figure out which of two portals you are referring to.

          • 2. Re: Conditional visibility in related record
            NicholasWelander

            Understandable. In all cases but the first, I'm referring to the portal displaying Table1_Table2_selected_Table3 records. There is no script associated with the disappearing field, only a conditional visibility that hides it when "Table1_Table2_selected_Table3::condition ≠ 1". Since the portal row (T3) that this popover is inside has condition =1, it should be visible, which it is, until it's in focus.

            The field is part of Table1_Table2_selected, not table 3. I think because of that, it's looking at the condition in the first record of Table1_Table2_selected_Table3 (which has condition=2, let's say) instead of the current one. Should it be? Should the current portal row be in focus because I'm in its popover, or should it not be because I'm in the Table2 field?

            Either way, it works correctly for some other fields and it always worked in FM13.