2 Replies Latest reply: Apr 16, 2015 11:25 AM by Sebastian Lettner RSS

    function if()

    Kenny Hua

      Hello everyone,


      I Have a question about if's function: Can I use this function with a FTP in the condition? Because I want to know if my file exist in this FTP or if it doesn't exist pass to another FTP and can I put a LOAD in the "if". And I always have an error with my "if" with the sign after my condition in red.



      for a = 1 to FieldValueCount('Code')

      let vCountryCode = FieldValue('Code', $(a));


          for m = 1 to FieldValueCount('Id');

            let vUserId = FieldValue('Id', $(m));

            let vPassword = FieldValue('Password', $(m));

            If([ftp://$(vUserId):$(vPassword)@$(vCountryCode)%20-%20AAA%20AAA%20AA.xlsx] <> 'Null' ,


                      LOAD * FROM [ftp://$(vUserId):$(vPassword)@$(vCountryCode)%20-%20AAA%20AAA%20AA.xlsx.xlsx]

                      (txt, codepage is 1252, embedded labels, delimiter is ';', no quotes, table is Feuil1);

                      STORE CONVERT into TABLESv2/VVV.qvd(qvd);

                NEXT, NEXT)


      I hope this is not too confuse.