The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Dec 4, 2012
Company: China Welfare Lottery

Hi! My users are very smart and enter spaces when they are lazy to fill required fields。 I check like this:

Code
If Address <> "" Then

 
#2
People who like this: 0 Yes / 0 No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

You can use function IsBlankString.

Code
If Not IsBlankString(Address) Then

Edited: ivan avdonin - Mar 27, 2013 10:31 AM
 
#3
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Dec 4, 2012
Company: China Welfare Lottery

Thanks for your help!

 
#4
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

Code
If ValueIsFilled(Address) Then

will work even if Address is not of string type. Not sure if it trim blank spaces.

Edited: Alexey Gerasimov - Mar 27, 2013 11:32 PM
 
#5
People who like this: 0 Yes / 0 No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

If type of parameter is String then ValueIsFilled is the same as IsBlankString

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.

/* Прямое попадание по классу из инспектора */ .article-content h6, div.article-content h6 { font-size: 18px !important; color: #222 !important; font-weight: bold !important; display: block !important; text-transform: none !important; margin: 25px 0 10px 0 !important; line-height: 1.4 !important; } /* На случай, если это все же h5 */ .article-content h5, div.article-content h5 { font-size: 20px !important; color: #222 !important; font-weight: bold !important; display: block !important; }