Copy field values to repeated lines

Discussion in 'General Discussions' started by Poojan Shah, May 3, 2021.

    
  1. Poojan Shah

    Poojan Shah New Member


    Dear Experts,

    Trust everyone is doing well and safe.

    I am looking to copy the field value of the same name to the repeated lines.

    For eg.:

    If I have a Rate Field and would like to copy same rates in the repeated fields (from the first rate field) then on a press of a button, the rate gets flooded in the rest of repeated line fields with the first value in the first line.
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Check out $$PrevObj
     


  3. Poojan Shah

    Poojan Shah New Member


    Thank you Amit ji. I tried but gives an error "Action execution failed!"

    Code:
    [Field: PT SRate]
        Use            : VCHBATCH Rate
        Delete        : Skip On
        Storage        : PTSRate
        Width        : @@PTRateWidth
        Variable    : PTSRateVar
    
    [Button: PT CopyFieldValue]
        Key        : F5
        Action    : Call    : PT CopyValue
        Title    : $$LocaleString:"Copy Value"
       
    [Function: PT CopyValue]
        Variable    : PTSRateVar    : Number
       
        00    : Set File Log On
        01    : Set    : PTSRateVar    : $$Number:#PTSRate
        ;;01    : If    : $$PrevLineField
        02    : Set Value    : PTSRate    : $$PrevLine:##PTSRateVar
        ;;03    : End If
        04    : Log    : ##PTSRateVar
        05    : Set File Log Off
        06    : Return

    What I am looking for is to do a batch process and fill the value from the first field as shown below in the image

    upload_2021-5-4_15-55-4.png

    Thank you
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    02 : Set Value : PTSRate : $$PrevLineField
     


  5. Poojan Shah

    Poojan Shah New Member


    Amit ji,

    Set Value is not working ... I also tried to set it as a variable but still no luck.
     


  6. Poojan Shah

    Poojan Shah New Member


    I have solved the problem by using an action button and fetching the value with $$PrevLine:#FieldName using system formula.
     


Share This Page