how to skip the step if the value in the csv file are empty/null(no value in the cell)

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
imacro_guy
Posts: 5
Joined: Mon Nov 07, 2016 1:59 pm

how to skip the step if the value in the csv file are empty/null(no value in the cell)

Post by imacro_guy » Sun Apr 14, 2019 10:50 am

Hi Team,

for some scenarios, some cells in the csv file are null(numerous lines), if without extra handling, the Open File window will just hang out there, which cause the whole process failed, so it's expected to skip the steps(with empty value) and move on to next steps.
how to handle this?
maybe the If - else - endIf, or something else?

the key code for this step in the .iim file is:

Code: Select all

TAG POS=1 TYPE=INPUT:FILE ATTR=ID:Image_upload CONTENT={{!COL3}}
OS:
Windows 7 64 bit.
Browser:
Google Chrome
Version 73.0.3683.103 (Official Build) (64-bit)
iMacros:
iMacros for Chrome 10.0.5

thank you.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to skip the step if the value in the csv file are empty/null(no value in the cell)

Post by chivracq » Sun Apr 14, 2019 2:27 pm

imacro_guy wrote:
Sun Apr 14, 2019 10:50 am
Hi Team,

for some scenarios, some cells in the csv file are null(numerous lines), if without extra handling, the Open File window will just hang out there, which cause the whole process failed, so it's expected to skip the steps(with empty value) and move on to next steps.
how to handle this?
maybe the If - else - endIf, or something else?

the key code for this step in the .iim file is:

Code: Select all

TAG POS=1 TYPE=INPUT:FILE ATTR=ID:Image_upload CONTENT={{!COL3}}
OS:
Windows 7 64 bit.
Browser:
Google Chrome
Version 73.0.3683.103 (Official Build) (64-bit)
iMacros:
iMacros for Chrome 10.0.5

thank you.
FCI mentioned => Perfect...! :D (Even if 'Free' or 'PE' Version is missing, will be 'PE' in your case I reckon, if you are using a DataSource...)
But try to select the "correct" Sub-Forum when opening a new Thread, this one has nothing specific to iMacros for CR, I would think...

OK..., to answer your Qt, yep, use 'EVAL()' to first check the Content of your Cell in the DataSource to only conditionally fire the Upload..., stg like:

Code: Select all

SET Empty_Cell EVAL("var c3='{{!COL3}}'; var x,y,z; x=c3.length; if(x==0){z=0;} else{z=1;}; z;")
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
TAG POS={{Empty_Cell}} TYPE=INPUT:FILE ATTR=ID:Image_upload CONTENT={{!COL3}}
=> When that Cell is empty (=> length=0), the 'TAG POS=0' won't do anything... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply