AutomationNinja 194 Posted December 10, 2012 Report Share Posted December 10, 2012 hey I was wondering if an upload file hasn't been chosen then can I have an alert reminding the user that they need to upload their file? What I have so far is that the "upload file" #variable is added to a %list. So if they don't upload the file then it shows in the debugger as 0 items, but when I did a "and if" "comparison" %list = 0 items then "alert", but that didn't work. Tried some other things too, yet no dice. Waddya figure? Quote Link to post Share on other sites
Legend 181 Posted December 11, 2012 Report Share Posted December 11, 2012 You might want to try it as a true/false variable... if --> comparison --> variable = true --> then do something, else --> do something else... Quote Link to post Share on other sites
jomark3 25 Posted December 11, 2012 Report Share Posted December 11, 2012 I find it sloppy to use alerts, instead, I use define subroutines to test if a client has entered required information. In the sub, I remind them that they have not entered some of the data required and give them instructions on how to enter it as in the following example: Create a define called Check Upload. If #upload_variable=$nothing Then Load html (In the html file, it says something like - You Have Not Yet Uploaded The File! Place your mouse in the box labeled "Upload" and paste in the file you want to upload.) Wait 1 second Check Upload End of define 1 Quote Link to post Share on other sites
VaultBoss 310 Posted December 11, 2012 Report Share Posted December 11, 2012 What I have so far is that the "upload file" #variable is added to a %list. So if they don't upload the file then it shows in the debugger as 0 items, but when I did a "and if" "comparison" %list = 0 items then "alert", but that didn't work. Always initialize your variables/lists/tables somehow if you're gonna have instaces with null fills and at the same time you wanna check conditions on them, or else you will get errors. In your case, initialize your list with a dummy info that you know for sure won't happen in practise and check the IF against that, not against null or zero... Hope it makes sense... 1 Quote Link to post Share on other sites
AutomationNinja 194 Posted December 16, 2012 Author Report Share Posted December 16, 2012 You mean like this: http://i48.tinypic.com/25qarrc.png 2 Quote Link to post Share on other sites
VaultBoss 310 Posted December 16, 2012 Report Share Posted December 16, 2012 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.