NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on August 29, 2013, 08:28:27 PM

Title: Restricting a drop list based on more than 1 criteria
Post by: terryd on August 29, 2013, 08:28:27 PM
I have a drop list of statuses called from a form.
I would like to restrict which statuses display based on 2 criteria
When a user logs in I set a SessionLevel() for him.
Each status record has a display order (unique)
In the
       ! Start of "Validate Drop Field Record"
        ! [Priority 5000]
        !Restrict list of Dealers based on Session Level and Display Order
        IF p_web.getSessionLevel() <= 4 !Dealers
            IF  WOS:DisplayOrder > 2      !I dont want the dealer to see any display order > 2
                xxxxxxx
            END
        END
        ! End of "Validate Drop Field Record"

What would I substitute for the xxxxxxx line above to only display the records that a dealer will see in the drop list

In a normal Clarion browse I would have
ReturnValue = RECORD:Filtered
in the Validate embed before the Parent Call.
 
Title: Re: Restricting a drop list based on more than 1 criteria
Post by: terryd on August 29, 2013, 08:39:43 PM
Sorted.
For anyone interested:
I was working in the wrong embed point
      ! Start of "Option Filter & Order"
      ! [Priority 5000]
      IF p_web.getSessionLevel() <= 4 !Dealers
          WOR:OrderStatusID_OptionView{prop:filter} = p_web.CleanFilter(WOR:OrderStatusID_OptionView,'WOS:DisplayOrder <= 2') 
      END
     
      ! End of "Option Filter & Order"
     
Works perfectly