If Statement Not Working and Splitter ',' within the FOR loop also not working.

    Task: mimicText4

    

    A1: Read File [

         File: Download/CSV File Viewer/hi.txt

         To Var: %text_data

         Structure Output (JSON, etc): On ]

    

    A2: Variable Set [

         Name: %new_line

         To: 

         

         Structure Output (JSON, etc): On ]

    

    A3: Read File [

         File: Download/CSV File Viewer/2010.csv

         To Var: %csv_data

         Structure Output (JSON, etc): On ]

    

    A4: Variable Search Replace [

         Variable: %text_data

         Search: \bkey\w*\b

         Ignore Case: On

         Store Matches In Array: %text_keys ]

    

    A5: Variable Search Replace [

         Variable: %csv_data

         Search: \bkey\w*\b

         Ignore Case: On

         Store Matches In Array: %csv_keys ]

    

    A6: Variable Split [

         Name: %csv_data

         Splitter: %new_line ]

    

    A7: For [

         Variable: %csv_line

         Items: 1:%csv_data(#)

         Structure Output (JSON, etc): On ]

    

        A8: For [

             Variable: %csv_word

             Items: 1:%csv_line(#)

             Structure Output (JSON, etc): On ]

    

            A9: Variable Split [

                 Name: %csv_line

                 Splitter: , ]

    

        A10: End For

    

    A11: End For

    

    A12: Flash [

          Text: %csv_line(%csv_word)

          Long: On

          Continue Task Immediately: On

          Dismiss On Click: On ]

    

    A13: For [

          Variable: %csv_for

          Items: 1:%csv_keys(#)

          Structure Output (JSON, etc): On ]

    

        A14: If [ %csv_keys(%csv_for)! ~ %text_keys(%csv_for) ]

    

            A15: Variable Search Replace [

                  Variable: %csv_data

                  Search: \bkey\w*\b

                  Ignore Case: On

                  Store Matches In Array: %test_match

                  Replace Matches: On

                  Replace With: %csv_keys(),Find ]

    

            A16: Variable Split [

                  Name: %text_data

                  Splitter: , ]

    

        A17: End If

    

    A18: End For

    

    A19: Write File [

          File: Download/CSV File Viewer/2010.csv

          Text: Header1,Header2,Header3

         Row1Col1,Row1Col2,keywords1

         Row2Col1,Row2Col2,keywords2

         Row3Col1,Row3Col2,keywords3

          Add Newline: On ]

    

    

Comments