Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to check to see if IW value exists
System
I need to be able to check to see if an Iw_value name field exists. There are times when it will be empty and the field is a date field that is being reformatted via a ColdFusion call to the TPL. It seems to me when fields are empty, Teamsite does not return any values - how can I check for this in CF or TS?
<CFIF (#Parameterexists('{iw_value name="philresults.Philadelphia Date" /}')#)>
Find more posts tagged with
Comments
Adam Stoller
Not sure if this is what you're asking for - but in the PT you could put the [intended] value extracted from the DCR into a Perl variable and then use a conditional to determine whether or not it makes sense to use it for generated output.
You could probably do the same thing with an <iw_if> clause if you don't want to use Perl, I just find Perl more intuitive.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
The IF statement doesnt seem to work because Teamsite does not return the value since its empty, thus trapping it does not work. I must be ab le to trap it so I can have Coldfusion skip the date formatting statement. CF returns an error because the varible does not exist.
My if statement is below
<iw_if expn='{iw_value name="philresults.Philadelphia Date" /} eq " " '>
MattP
I *think* your if statement is checking to see if the value is eq to "space". All you need is...
<iw_if expn='{iw_value name="philresults.Philadelphia Date" /}'>
<iw_then>
do something
</iw_then>
<iw_else>
do something else...or nothing
</iw_else>
</iw_if>
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA