Myriad Forum « When an field is sometimes empty »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
Oct 1st, 2014, 12:56pm 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   When an field is sometimes empty
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: When an field is sometimes empty  (Read 835 times)
amilya
Board Newbie
*





   
Email

Posts: 3
When an field is sometimes empty  
« on: Jan 13th, 2009, 8:11pm »
Quote | Modify

I am trying to build a script to verify certain fields. What I am having trouble with is that this field is sometimes populated and sometimes blank. I need the script to verify when the field is populated and skip it if its blank. I know the If function can be used, but i am not sure exactly how. Any suggestions?
offline
bubu42
Board Master
*****





   


Gender: male
Posts: 7360
Re: When an field is sometimes empty  
« Reply #1 on: Jan 13th, 2009, 9:34pm »
Quote | Modify

Perhaps something like this :
if field~='' then
   <action to take if field is not empty>
else
   <action to take if field is empty>
end
The "if" clause must be followed by "then" and closed with "end". In case you want to test equality, don't forget to have a double "=" (e.g. if value1==value2 then ... end)
offline
amilya
Board Newbie
*





   
Email

Posts: 3
Re: When an field is sometimes empty  
« Reply #2 on: Jan 16th, 2009, 4:27pm »
Quote | Modify

Thanks  , I will try that!
offline
amilya
Board Newbie
*





   
Email

Posts: 3
Re: When an field is sometimes empty  
« Reply #3 on: Jan 16th, 2009, 5:10pm »
Quote | Modify

The only problem is that when it is populated, and if I put in an incorrect value it is still passing.
 
Am I doing something incorrect?
offline
bubu42
Board Master
*****





   


Gender: male
Posts: 7360
Re: When an field is sometimes empty  
« Reply #4 on: Jan 16th, 2009, 9:25pm »
Quote | Modify

Can you provide the part of the code containing the test ?
offline
Pages: 1  Reply | Notify of replies | Print

« Previous topic | Next topic »

« Myriad Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.

Top of page
Last update:  (c) Myriad 2013