Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to use conditionals to check for NULL in Xthreads?
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #1
How to use conditionals to check for NULL in Xthreads?
How to use conditionals to check for NULL in Xthreads? I would like to check for NULL values in Xthreads and then do somthing else

thanks

edit

Quote:<if $GLOBALS['threadfields']['key']!=0 then>

does NOT work?
(This post was last modified: 01-31-2015 09:02 PM by ollie2015.)
01-31-2015 08:48 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: How to use conditionals to check for NULL in Xthreads?
What null values?

If empty, XThreads will use the blank value in that variable, if you've set one.

My Blog
01-31-2015 10:17 PM
Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #3
RE: How to use conditionals to check for NULL in Xthreads?
yes I have set the blank value, and I am using that blank value elsewhere....

BUT i need to check if the initial field is empty or not

eg. User Avatar, if not filled, then use default, BUT in another location, i need to check for the user Avatar, if present then display it and if NOT to display NOTHING, no default avatar either
02-01-2015 12:24 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: How to use conditionals to check for NULL in Xthreads?
Try

Code:
<if $GLOBALS['threadfields_x']['key']['num_values']!=0 then>


My Blog
02-01-2015 02:31 PM
Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #5
RE: How to use conditionals to check for NULL in Xthreads?
whats the X and the num_values? where do i find those?

thanks in advance

edit: works thank you
(This post was last modified: 02-01-2015 06:35 PM by ollie2015.)
02-01-2015 06:26 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: