It might be hard to replicate without sending you the whole DB/site and
providing instructions, but hopefully this explains the problem.

Basically I had a text var for a table row template.

$row_html := "<tr><td class=\"^5\">^1</td><td class=\"^5\"
style=\"text-align:right\">^2</td><td class=\"^5\">^3</td><td
class=\"^5\">^4</td></tr>"
if ($delete_checkbox) `prepend first column
    $row_html := "<tr><td class=\"^5\">^6</td><td class=\"^5\">^1</td><td
class=\"^5\" style=\"text-align:right\">^2</td><td class=\"^5\">^3</td><td
class=\"^5\">^4</td></tr>"
                end if

... Run calculations to set row values. These included $estim (a cost
estimate)
... Back in Aug 10 I had to change the String format to include the
leading \ to make this work
... Note 
...  If [IOPR_COST_ESTIM_HIST]cost_estimate_dollars is 0, $estim will be
set to "Needs Estimate"
...  If [IOPR_COST_ESTIM_HIST]cost_estimate_dollars is -1, $estim will be
set to "No Cost Impact"

$estim := 
String([IOPR_COST_ESTIM_HIST]cost_estimate_dollars;"\$#,###,###,###")


if ($delete_checkbox)
    $checkbox := "<input type=\"checkbox\" "
    $checkbox += "name=\"f_cb_delete" + "\" "
    $checkbox += "value=\"" + $ioprceh_id + "\" "
    $checkbox += choose( find in array($checked;$ioprceh_id) > 0;
"checked" ; "")
    $checkbox += " />"
                                        

    $output  := $output + param text
($row_html;$date;$estim;$by;$comment;$class;$checkbox)
                                else
   $output  := $output + param text
($row_html;$date;$estim;$by;$comment;$class)
                                end if


However, I just wrote a quick test and

<%
$cost_string := String($cost;"\$#,###,###,###") `This fails, but worked at
one point
    $template := "<p>Output: ^1</p>"
    write (param text ($template; $cost_string))  `==> Output: \

        
        $cost_string := String($cost;"$#,###,###,###") `This works
    $template := "<p>Output: ^1</p>"
    write (param text ($template; $cost_string)) `==> Output: $50,000
%>


I had tried removing the \ from the string format when debugging this
problem earlier and it didn't fix the problem. The code is in a library
thought. Maybe the library hadn't updated and I assumed something had
changed with 'param text'. I did try multiple times though and waited a
few minutes to allow the library to refresh. I believe I even restarted
the web client. Thus, the assumption that there was a problem.

That said, I've replaced 'param text' with %% and it works. I'm not going
to re-install the param text code. The command "param text" can do some
really cool things, but in this case %% is probably more appropriate.

Thanks,

-- Brad


On 4/2/12 3:37 PM, "Aparajita Fishman" <[email protected]>
wrote:

>> Back in in 2010 I had made the following change to workaround a problem
>> displaying the same value when using "param text"
>> 
>> $estim := 
>> String([IOPR_COST_ESTIM_HIST]cost_estimate_dollars;"\$#,###,###,###")
>> `27-Aug-2010, bdp, escaped \$ in STRING format
>> 
>> Aparajita had suggested not using param text at the time, but I stuck
>>with
>> the workaround. 
>
>What is the code that used param text?
>
>Regards,
>
>   Aparajita
>   www.aparajitaworld.com
>
>   "If you dare to fail, you are bound to succeed."
>   - Sri Chinmoy   |   www.srichinmoy.org
>
>_______________________________________________
>Active4D-dev mailing list
>[email protected]
>http://list.aparajitaworld.com/listinfo/active4d-dev
>Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to