7 Replies Latest reply on Jul 31, 2013 6:52 AM by CurtPeredina

    Conditional Formatting with Portals

    CurtPeredina

      Title

      Conditional Formatting with Portals

      Post

           I have a layout which contains two portals. One portal has time entry for the aircraft layout being viewed, one portal record for each time the aircraft status is updated.....

           The second portal contains other information for scheduled maintenance. Some of these portal records have aircraft times which cannot be exceeded.

           On the layout that contains these two portals, I have a field which displays the highest time from the first portal (a calculated field)- this field on the main layout is named <<status_entry::max_hobbs>>

           Is it possible to conditionally format records to highlight in the maintenance portal when the time on a maintenance record exceeds the time from the max_hobbs field on the main layout?

           In other words, when the hobbs time exceeds a maintenance record, that maintenance record is conditionally formatted...I can't seem to get it to work :)

           Thanks once again!

        • 1. Re: Conditional Formatting with Portals
          philmodjunk

               Can you spell out the relationships involved here? Especially the match fields used?

          • 2. Re: Conditional Formatting with Portals
            GuyStevens

                 It is possible that you might need to do two things here:

                 - Have a calculation that determines wether or not this max time has been exeeded or not.
                 I would think maybe an IF statement that sets a value in a field.

                 like:
                 IF (Portal1::SumTime > Portal2::MaxTime ; "Overtime" ; "" )

                 - Then when the value "overtime" appears in that field "MaxTime" your conditional formatting kicks in.

                 Kind of like the formula:

                 Portal2::MaxTime = "Overtime"

                 and this results in a fill color, or text color, or ...

                  

            • 3. Re: Conditional Formatting with Portals
              CurtPeredina

                   Thank you for the replies, I may have confused the matter a bit by mentioning the second portal.

                   So the main layout is for "aircraft". In this layout, I have a field <<status_entry::max_hobbs>> which takes the max from the status_entry portal and displays it on the layout (there may be hundreds of status records as the aircraft time is updated).

                   The "compliance" portal contains records specific to the aircraft. Some of these compliance portal records also have times (when they are due).

                   I would like to have each portal record highlight when the time on the portal record exceeds the time from the main layout <<status_entry::max_hobbs>>...

                   The relationship is:

                   compliance<<aircraft>>status_entry

                   Hope that clears it up a bit...

              • 4. Re: Conditional Formatting with Portals
                philmodjunk

                     So your relationship to this portal is: (But with your names used in place of mine...)

                     Compliance::__pkAircraftID = Status_Entry::_fkAircraftID

                     and the conditional formatting is specified for objects in the portal to status_entry; they all need to refer to the same value computed as a calculation field in compliance?

                     I'm having trouble seeing why you are having problems with a conditional format.

                     A conditional format that compares a value from a field in the portal's table occurrence to a value from a field in the layout's table occurrence should work without any issues.

                     Perhaps you should post your conditional format expression that doesn't work.

                • 5. Re: Conditional Formatting with Portals
                  CurtPeredina

                       Thanks - here it is:

                       (right click -> conditional formatting)

                       "Value"  - "is >=" <<status_entry::max_hobbs>>

                        

                        

                  • 6. Re: Conditional Formatting with Portals
                    philmodjunk

                         Which looks correct to me though I usually use the formula format:

                         Self > status_entry::max_hobbs

                         Just to check the obvious here, go to layout mode, open layout setup and check the "show records from" drop down. Does it show this exact text?

                         status_entry

                         And since max_hobs is a calculation field, is number or text specfiied as the result type? If you selected text, the value will look correct but won't evaluate correctly in the conditional format expression (or any other expressions that compare values to it).

                    • 7. Re: Conditional Formatting with Portals
                      CurtPeredina

                           Fixed the issue - deleted the "<< >>" from the variable!