please help me ..How to change title if "a repeated line value select"

Discussion in 'Free Source Codes' started by Jenny, Jun 11, 2021.

    
  1. Jenny

    Jenny Active Member


    My code is like that but only one 1st line change title
    after second line when change "voucher type" its not changing .. please help me

    Code:
    [Field : JennyPaymentDebitLedgerFld1]
    
    Width : 25
    ;Set as :"Debit Ledger"
    Set as : If #JennyPaymentVchtypeFld = "Payment" then $$LocaleString:"(Dr) Party Ledger" else +
    If #JennyPaymentVchtypeFld = "Receipt" then $$LocaleString:"(Dr) Bank Name" else +
    If #JennyPaymentVchtypeFld = "Contra" then $$LocaleString:"(Dr) Cash / Bank Name" else "Debit Ledger"
    Skip : Yes
    Background:lightsteelblue
    
    [Field : JennyPaymentCreditLedgerFld1]
    Width : 25
    ;Set as :"Credit Ledger" ;JennyPaymentCreditLedgerFld
    Set as : If #JennyPaymentVchtypeFld = "Payment" then $$LocaleString:"(Cr) Bank Name" else +
    If #JennyPaymentVchtypeFld = "Receipt" then $$LocaleString:"(Cr) Party Ledger" else +
    If #JennyPaymentVchtypeFld = "Contra" then $$LocaleString:"(Cr) Cash / Bank Name" else "Credit Ledger"
    Skip : Yes
    Background:lightsteelblue
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Set Always : Yes
     


  3. Jenny

    Jenny Active Member


    not change when 2nd line data put
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As per your condition given, there will be conflict........always.........

    if first is payment...then title changes....... when u put different value in 2nd line, ..... which one should it take.
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You can try a condition which takes the value of last line........by using Collectionfield:$value:Last:Collectionname
     
    Jenny likes this.


  6. Jenny

    Jenny Active Member


    When second line put different then it's not change..it's showing as per first line title.. continuously not change
     


  7. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    This happens when you use Skip : Yes in the field.

    Try option with filed

    [Field : JennyPaymentDebitLedgerFld1]
    Set As : "Debit Ledger"
    Width : 25
    Option : FldPmntedger : #JennyPaymentVchtypeFld = "Payment"
    Option : FldRcptLedger : #JennyPaymentVchtypeFld = "Receipt"
    Option : FldCntrLedger : #JennyPaymentVchtypeFld = "Contra"
    Set Always : Yes
    Skip :Yes

    [!FldPmntLedger]
    Set as : $$LocaleString:"(Dr) Party Ledger"

    [!FldRcptLedger]
    Set as : $$LocaleString:"(Dr) Bank Ledger"

    [!FldCntrLedger]
    Set as : $$LocaleString:"(Dr) Cash/ Bank Ledger"


    Not tested.. You can use switch also
     
    Jenny likes this.


  8. Jenny

    Jenny Active Member


    Not change it's showing as per first line title
     


  9. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    [Field : JennyPaymentDebitLedgerFld1]
    Set As : "Debit Ledger"
    Width : 25
    Option : FldPmntedger : #JennyPaymentVchtypeFld = "Payment"
    Option : FldRcptLedger : #JennyPaymentVchtypeFld = "Receipt"
    Option : FldCntrLedger : #JennyPaymentVchtypeFld = "Contra"
    Set Always : Yes
    Skip :Yes

    [!Field : FldPmntLedger]
    Set as : $$LocaleString:"(Dr) Party Ledger"

    [!Field :FldRcptLedger]
    Set as : $$LocaleString:"(Dr) Bank Ledger"

    [!Field :FldCntrLedger]
    Set as : $$LocaleString:"(Dr) Cash/ Bank Ledger"

    Post your Modified Code ??
     
    Jenny likes this.


  10. Jenny

    Jenny Active Member


    [Field : JennyPaymentDebitLedgerFld1]
    Set As : "Debit Ledger"
    Width : 25
    Option : FldPmntedger : #JennyPaymentVchtypeFld = "Payment"
    Option : FldRcptLedger : #JennyPaymentVchtypeFld = "Receipt"
    Option : FldCntrLedger : #JennyPaymentVchtypeFld = "Contra"
    Set Always : Yes
    Skip :Yes
    [!Field : FldPmntLedger]
    Set as : $$LocaleString:"(Dr) Party Ledger"
    [!Field :FldRcptLedger]
    Set as : $$LocaleString:"(Dr) Bank Ledger"
    [!Field :FldCntrLedger]
    Set as : $$LocaleString:"(Dr) Cash/ Bank Ledger"

    [Field : JennyPaymentCreditLedgerFld1]
    Set As : "Credit Ledger"
    Width : 25
    Option : FldCrPmntedger : #JennyPaymentVchtypeFld = "Payment"
    Option : FldCrRcptLedger : #JennyPaymentVchtypeFld = "Receipt"
    Option : FldCrCntrLedger : #JennyPaymentVchtypeFld = "Contra"
    Set Always : Yes
    Skip :Yes
    [!Field : FldCrPmntedger]
    Set as : $$LocaleString:"(Cr) Bank Name"
    [!Field :FldCrRcptLedger]
    Set as : $$LocaleString:"(Cr) Party Ledger"
    [!Field :FldCrCntrLedger]
    Set as : $$LocaleString:"(Cr) Cash / Bank Name"
     


  11. Jenny

    Jenny Active Member


    Title not change in 1st line also
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    My opinion / advice remains the same............
     
    panam and Jenny like this.


  13. Devendra_Rawat

    Devendra_Rawat Well-Known Member



    My advice keeps changing :D:D


    If value in JennyPaymentVchtypeFld comes from a table then try

    [Field :JennyPaymentVchtypeFld]
    Dynamic : ""


    you may try it in all the optional fields also.. .. experiment, experiment, experiment....

    and then success. o_Oo_O
     
    panam and Jenny like this.


  14. Jenny

    Jenny Active Member


    Yes that field is a table..I will try and reply soon
     


  15. Jenny

    Jenny Active Member


    Not working....any other method ???
     


  16. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    give me required part of the code to test it
     


  17. Jenny

    Jenny Active Member


    I send you in ur email...plz check and reply me
     


  18. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    As per mail send,

    You are trying to change the heading of Debit and Credit columns, for each row, depending upon the content of Voucher Type Column in that particular row :D:D:D..

    You should give proper information.

    any opinion change @Amit Kamdar Sir now ??o_Oo_O



    Qe.jpg
     
    Jenny likes this.


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    @garima -- I already know what she wants.........

    I tried making a collection of VouchertypeColumn and based on the last entry, change the TITLE........ but not got results. :(:(
     
    Jenny likes this.


  20. Himanshu-2002

    Himanshu-2002 Active Member


    Try to Do like this

    [Field:ColumnName]
    Set as:##CurrentVarName
    Set Always:Yes


    [Field:DetailField]
    storage:...
    On:Accept:Yes:Field Accept
    On:Accept:Yes:Set:CurrentVarName:$$Value

    [Variable:CurrentVarName]
    type:string

    [system:variable]
    CurrentVarName:""

    It should work
     
    Jenny, panam and PANKAJ BHONDLE like this.


  21. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    ok.. I was under impression that the filed which required title change is in the same row.


    Himanshu's Idea may work


    or she can try accessname method
     
    Jenny and panam like this.


  22. Jenny

    Jenny Active Member


    Thanx a lot....its working
     


  23. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Hola Hola...then you must show screenshot as proof and LIKE all the solution providers :confused::cool::confused::cool:
     
    Jenny likes this.


  24. Himanshu-2002

    Himanshu-2002 Active Member


    Your Welcome and Can you please give me your report colour schema ?... I am using mine one from decades now...
     
    Last edited: Jun 16, 2021
    Jenny likes this.


  25. Jenny

    Jenny Active Member


     

    Attached Files:



Share This Page