DROP DOWN LIST

Discussion in 'Free Source Codes' started by Ruchit, Apr 30, 2019.

    
  1. Ruchit

    Ruchit New Member


    I have added a new column in sales voucher.
    I need to have a drop down list for the coloumn so that i can select from the list of stored name.

    Can anyone tell me how to achieve this.

    The code is given below

    [field:OTS Warranty]
    Use:Simple Field
    Set as:$BasicPackageMarks
    Style:p9
    Border : Thin Left
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Make a Table/Collection and put your list in that (if it is manual) ..... If it needs to pick values on auto mode, then make a collection for it.
     
    panam likes this.


  3. Ruchit

    Ruchit New Member


    thank you for prompt reply sir.
    I m a beginner. I dont know how to use tables..
    Can you write the code for me please.
     
    Tushar Deshmukh likes this.


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Friend...that why you should learn and start doing it........... refer and search in TDE for many examples.

    You did not give same reason to your professor during exams, did you?

    You start...and we will guide you along...................
     
    panam and vinayprasad.Dubai like this.


  5. ANAND J

    ANAND J Member


    absolutely correct. This one line... i checked for more than 45 min (##reporttitle) ...............
     


  6. rony

    rony Member


    Dear Experts,
    I have made one list for Invoice Type. In that 4-5 Items r there,Like Regular,Goods Return,Job Work ETC now if I want one item auto select what line i have 2 add.
    Thanks
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Set as : If $$Empty:$$Value then "regular" else $$Value
     


  8. rony

    rony Member


    Sir,
    I tried Error:" Function :Empty" could not find description. And I tried for both fields 1) in Table 2) In Table entry field. Same error comes
    Regards
     


  9. isri

    isri New Member


    Use Below Code:

    Set as : If $$IsEmpty:$$Value then"regular" else $$Value
     


  10. rony

    rony Member


    U did not see the post Amit sir already suggested above and my response was on that, u just copy his suggestion and posted.
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You should also first check the corrections made by "isri".... he has corrected a typo mistake I made and which you failed to notice or understand.

    So I think you owe an apology to him.
     


  12. rony

    rony Member


    Dear ISRI,
    Yes amit sir is correct, I could not understand and comment please forgive me . I didn't tried urs suggestion but will try and let u know.
    regards.
     


  13. rony

    rony Member


    Dear ,
    just now tried giving Error: cannot understand Bad formula.my table field is as under.
    [Table: Typ]
    Title : $$LocaleString:"Types of Invoice"
    List Name : $$LocaleString:"Regular", $$LocaleString:"Reverse",$$LocaleString:"Goods Return",$$LocaleString:"Not Applicable"
    Format : $Name,15
    ClientOnly : Yes
    Set as : If $$IsEmpty:$$Value then"regular" else $$Value.
    Regards.
     


  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Rony....

    The line .... Set As....is not to be used in the table....... You need to add this line in your FIELD.... the field in which you have referenced this Table.
     


  15. Hemant_panchal

    Hemant_panchal New Member


    And
    Use like this


    [Collection:typ]
    Title : $$LocaleString:"Types of Invoice"
    List Name : $$LocaleString:"Regular", $$LocaleString:"Reverse",$$LocaleString:"Goods Return",$$LocaleString:"Not Applicable"
    Format : $Name,15
    ClientOnly: Yes
     


  16. rony

    rony Member


    Amir sir,
    First I used in Field but, voucher entry can not be open same error "bad formula could not understand" so i tried in table. My field detail
    [Field : InvTyp1]
    Use : Name Field
    Width : 12
    Storage : InvoiceType1
    Style : LargeBold
    Table : Typ
    Set as : If $$IsEmpty:$$Value then"regular" else $$Value
    Set Always : Yes
    Invisible : If Not $$IsSales:$VoucherTypeName And Not $$IsPurchase:$VoucherTypeName Then Yes Else No
    Also tried with Mr. Hemant suggetion same error.
    Regards.
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    It is working fine and should be working.........

    Here is a test CODE below........ apply it and then go to Ledger Creation / Alteration and check......
    Your code might not be working, maybe it depends on where you are using it...... Since we are seeing the whole code, cannot comment.

    Check the below code.........

    [#Line: LED Currency]
    Add : Field : After : LED Currency : mydummyfld2

    [Field : mydummyfld2]
    Use : Name Field
    Width : 20
    Storage : InvoiceType1
    Table : Typ
    Set as : If $$IsEmpty:$$Value then "Regular" else $$Value
    Set Always : Yes

    [Table : typ]
    Title : $$LocaleString:"Types of Invoice"
    List Name : Regular, Reverse, "Goods Return", "Not Applicable"
    Format : $Name,15
     
    Last edited: Aug 8, 2020


  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If still not working for you.......

    Then you can try the below code......

    List Name : "1-Regular"
    List Name : "2-Reverse "
    List Name : "3-Goods Return"
    List Name : "4-Not Applicable"

    In above...the REGULAR will be by default.
     


  20. Rubazi

    Rubazi New Member


    try this it will work.

    [#Line: LED IsBillwise]
    Add : Field : After : LED IsBillWise : mydummyfld2
    [Field : mydummyfld2]
    Use : Name Field
    Width : 20
    Storage : InvoiceType1
    Table : Typ
    Set as : If $$IsEmpty:$$Value then "Regular" else $$Value
    Set Always : Yes
    [Table : typ]
    Title : $$LocaleString:"Types of Invoice"
    List Name : Regular, Reverse, "Goods Return", "Not Applicable"
    Format : $Name,15
     


  21. rony

    rony Member


    Dear Amir sir,
    Thanks second suggestion works, first tried did not work. Why don't know, trying why it is not working when it works 4 u. Any way got new idea thanks a lot. Mr. Rubazi posted is same what amit sir suggested 10.07 earlier. In list name if we did not put inverted coma even though it shows list.
    Regards
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Depends on where it is used.......and according to its variables, etc .... the code behaves differently.

    Consider this as a lesson in TDL.................

    Since you have only submitted snippet of code......... that is why I have applied the same code to a different section.............

    So keep trying....trying.....trying....and adopting different methods and methodologies.
     


  23. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member


    one missing field value : show table : always
     


  24. Chetan S

    Chetan S New Member


    Dear Amit Sir,

    Using this guidance I have created a UDF in Ledger Creation screen for feeding transporter name with drop down list.
    Here my query is: In the drop down list I have fed 7 different names of transporters. In case if I need to add a new one, i have to go and modify the TDL file. Instead of that is it possible to append the list directly from ledger creation screen and add new transporters name?

    Please guide me on this Sir.
     


  25. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Yes...possible...........

    In the report where you are inputting the name.....in that relevant field...... add a line : KEy : CreatenewName

    Make a KEY for CreatenewName with shortcut key like Alt+C or wotever..... and it will be Action : Alter : {your transportlist}
     
    Jaydeep Shah likes this.


Share This Page