TDLByte #26 : Modifying a Variable in Field

Discussion in 'Tally.Developer 9 Release 6.0: Videos & TDL Bytes' started by admin, Apr 16, 2016.

         
  1. admin

    admin Administrator Staff Member


    [​IMG]

    Modifying a Variable in Field

    [​IMG]

    TDLByte #26

    [​IMG]

    Dear Developers,

    In TDLByte#25, we learnt about Static Variable. This TDLByte discusses some interesting facts about the field attribute Modifies.

    What is it?

    The field attribute 'Modifies' modifies the value of the variable.

    Q: How to modify a variable with the value of a field?
    A: Use the attribute Modifies as given below:

    [​IMG]

    The variable vTSPLVar will be modified with the value of the field, once the report is accepted.

    Q: Can the variable acquire the field value as soon as the field is accepted?
    A: Yes. You can provide the third parameter value as given below:

    [​IMG]

    On setting the value of the third parameter to ‘Yes’, the variable acquires the value of the field immediately after accepting the field.

    Q: Can the variable be modified only with the field’s value?
    A: No. The attribute Modifies can be used to assign any value to the variable, with the help of
    the fourth parameter.

    [​IMG]

    The variable will be modified with the value of the field suffixed and prefixed with apostrophes ('or') as shown in the GIF Animation.Â

    [​IMG]

    Stay tuned to learn more on other concepts of Variables!
     


Share This Page