NetTalk Central

Author Topic: Restricting a drop list based on more than 1 criteria  (Read 2421 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Restricting a drop list based on more than 1 criteria
« 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.
 
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Restricting a drop list based on more than 1 criteria
« Reply #1 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
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186