Note that there are some explanatory texts on larger screens.

plurals
  1. POAny way to get multiple CFIFs displaying inside CFSET?
    primarykey
    data
    text
    <p>At the moment I have this code which is working great - </p> <pre><code>&lt;CFIF (DailyCount MOD 2) EQ 0&gt; &lt;CFSET via = '&lt;td style="background-color: DBEFB6;"&gt;#src#&lt;br&gt;&lt;font color="blue"&gt;#get_info.csuseragent#&lt;/font&gt;&lt;/td&gt;'&gt; &lt;CFELSE&gt; &lt;CFSET via = '&lt;td&gt;#src#&lt;br&gt;&lt;font color="blue"&gt;#get_info.csuseragent#&lt;/font&gt;&lt;/td&gt;'&gt; &lt;/CFIF&gt; </code></pre> <p>In the <strong>#get_info.csuseragent#</strong> field, at the moment it is displaying the whole UA string eg - <em>Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130406 Firefox/23.0</em></p> <p>I want to put the code below where the <strong>#get_info.csuseragent#</strong> tag is so it just displays the broswer/device. This works normally out of this setup but I cannot work out how to get it to display in that cell. Can anyone shed any light on how to get these CFIF statements to appear within this CFSET? </p> <pre><code>&lt;CFIF '#get_info.csuseragent#' contains "blackberry"&gt;Blackberry&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "iphone"&gt;iPhone&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "ipad"&gt;iPad&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "android"&gt;Android&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "msie"&gt;IE&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "firefox"&gt;Firefox&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "chrome"&gt;Chrome&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "opera"&gt;Opera&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/534.53.10"&gt;Safari&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/534.57.2"&gt;Safari&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/533.21.1"&gt;Safari&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/533.19.4"&gt;Safari&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/533.18.5"&gt;Safari&lt;/CFIF&gt; &lt;CFIF '#get_info.csuseragent#' contains "Safari/534.50"&gt;Safari&lt;/CFIF&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload