<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged steps</title>
<link>https://overflow.efficy.io/?qa=tag/steps</link>
<description>Powered by Question2Answer</description>
<item>
<title>How get the key into a step in float value rather than navchar when using &lt;#=@ data.key #&gt;</title>
<link>https://overflow.efficy.io/?qa=6806/into-step-float-value-rather-than-navchar-when-using-data-key</link>
<description>&lt;p&gt;Hello &lt;br&gt;
I want to customize the dialog editing screen of a step depending on typeof reference, some filed must be hidden or not.&lt;/p&gt;

&lt;p&gt;So I try to get the reference and more information through an SQL query.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%RunQuery('PJM', param1=4976, sql=|select
WRKS.K_STEP, WRKS.K_PROJECT, PROJ.REFERENCE, WRKS.F_GAMME, WRKS.F_LEVEL, WRKS.F_LEVEL, 
WRKS.F_TARGET, WRKS.F_TYPE, WRKS.F_MODULE, WRKS.F_QUALIFICATION 
from 
&amp;lt;#TABLE NAME=&quot;WRK_STEPS&quot;&amp;gt; WRKS
INNER JOIN &amp;lt;#TABLE NAME=&quot;PROJECTS&quot;&amp;gt; PROJ ON WRKS.K_PROJECT = PROJ.K_PROJECT
where 
K_STEP = :param1 |
)%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; value=&quot;&amp;lt;%GetField(REFERENCE, query=PJM, context=TEXT)%&amp;gt;&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The query return the reference if I hardcode the key.&lt;br&gt;
In the macro &amp;lt;#=@ data.key #&amp;gt; return the key of the step without problem.&lt;/p&gt;

&lt;p&gt;Problem when I try to use  &amp;lt;#=@ data.key #&amp;gt; in the param1 the query respond that a navchar can't be convert to a float.&lt;br&gt;
So I tried &amp;lt;#=@ GetDatabaseNumeric(data.key) #&amp;gt; and just &amp;lt;%GetKey()%&amp;gt; in both cases it's same result.&lt;/p&gt;

&lt;p&gt;Do you have any solution to run the query with a dynamic key.&lt;br&gt;
File is MacroWorkloadCustom.txt and I'm into the RoadmapStepCustom macro.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6806/into-step-float-value-rather-than-navchar-when-using-data-key</guid>
<pubDate>Tue, 07 Feb 2023 17:06:34 +0000</pubDate>
</item>
</channel>
</rss>