lookup

Last post 10-27-2008 10:23 PM by Vaidy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-27-2008 12:33 PM

    • IamET
    • Top 150 Contributor
    • Joined on 10-15-2008
    • Posts 8

    lookup

    hi,

    i want to use  'IV_Item_Number_Lookup'  but return the Item Description to my range fields instead of the Item Number.

    also i would like the list to be sorted by Item Description coz I am selecting a from-to range. 

    so far i've been using somethng like this for the Item Number:

    open form 'IV_Item_Number_Lookup' return to '(L) start_range';

     i tried to open the lookup form by setting the 'Sort by' to 2. I dont know if it is as simple as this and i am just having trouble with the syntax but I have a feeling it is more complicated.

    Anyway, if u can provide me with some code as well it be appreciated.

    cheers

     

     

    Tags: , ,
  • 10-27-2008 4:27 PM In reply to

    Re: lookup

    The following is from the LOOKUP.DOC document in the Software Development Kit (SDK).

     

    IV_Item_Number_Lookup

     

    Script call:

                    local IV_ItemLookup        IL. set IL:'Item Number' to VAL1.set IL:’Item Description to VAL2.set IL:’Item Class Code’ to VAL3.set IL:’Item Short Name’ to VAL4.set IL:’Item Generic Description’ to VAL5.set IL:'Sort By' to VAL6.set IL:’Return Value’ to VAL7.call OpenWindowRet of form IV_Item_Number_Lookup,IL, ITEM_NUMBER_FIELD. 

    Description:

    The first section of the script sets up the composite field that is used while opening the lookup window.  The pieces of the composite will be used to set sort by values and to limit what shows in the window.  The composite will be described below. OpenWindowRet is a form-level procedure for the IV_Item_Number_Lookup form.  It has two parameters that are specified below. · IL is the composite field described as follows: ·         VAL1 is the string value for the item number that the lookup form will fill from.·         VAL2 is the string value for the item description that the lookup form will fill from.·         VAL3 is the string value for the item class code that the lookup form will fill from.·         VAL4 is the string value for the item short name that the lookup form will fill from.·         VAL5 is the string value for the item generic description that the lookup form will fill from.·         VAL6 is an integer value that passes in the sort by option.1 = by Item Number2 = by Item Description3 = by Item Class Code4 = by Item Short Name5 =  by Item Generic Description·         VAL7 is not currently used. · ITEM_NUMBER_FIELD is the field on your form that should accept the return value.

     

    It says that VAL7 is not used, but these values should work

    0 = Item Number
    1 = Generic Description
    2 = Item Description 

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

     

    Tags: ,
  • 10-27-2008 10:23 PM In reply to

    • Vaidy
    • Top 50 Contributor
    • Joined on 06-10-2008
    • India
    • Posts 16

    Re: lookup

    David,

    I checked this with a sample call and it does work. Should be working for IamET as well.

     

    Thanks
    Vaidy Mohan
    www.vaidy-dyngp.com
Page 1 of 1 (3 items)