<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged virtual-field</title>
<link>https://overflow.efficy.io/?qa=tag/virtual-field</link>
<description>Powered by Question2Answer</description>
<item>
<title>Does Enterprise &lt;&gt; Apsis connector accept virtual fields on field mapping ?</title>
<link>https://overflow.efficy.io/?qa=7184/enterprise-apsis-connector-accept-virtual-fields-mapping</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Did someone used a virtual (V_ with usage P) field during a mapping between Enterprise &amp;lt;&amp;gt; Apsis ? &lt;br&gt;
I was told that virtual fields are supported by Enterprise &amp;lt;&amp;gt; Apsis connector. It is possible to select the field during the mapping (Apsis interface). But when running the full sync I am getting the error that &lt;code&gt;V_  fields is invalid column name&lt;/code&gt; which is normal in Enterprise as it's a virtual field.&lt;/p&gt;

&lt;p&gt;To get the contacts based on mapped fields in Apsis, Apsis calls an Enterprise node/api end point &lt;code&gt;serverjs\api\node\marketing\apsis\contacts.js&lt;/code&gt; which calls a function from  &lt;code&gt;serverjs\marketing\apsis.js &amp;gt; contacts&lt;/code&gt; that runs a query using the provided list of fields from a payload.&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=15271177369622694093&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Internal replies from @Kristof Pauwels:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The consult, list and search API do not support virtual fields, they&lt;br&gt;
are always excluded from the result.  That's not wrong on itself, it&lt;br&gt;
guarantees the best performance. Only when running a query, virtual&lt;br&gt;
fields can be included. So it will depend on what operation the Apsis integration uses. There are dedicated Apsis system queries and ServerJs node endpoints..&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also decide to override the contacts method with a custom&lt;br&gt;
version. Try using the &lt;code&gt;&amp;lt;#Field&amp;gt;&lt;/code&gt; tag and see if its replaced by the&lt;br&gt;
SQL expression, else you have to hardcode the SQL expression and&lt;br&gt;
alias it as V_MYCOLUMN.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7184/enterprise-apsis-connector-accept-virtual-fields-mapping</guid>
<pubDate>Tue, 01 Jul 2025 13:41:14 +0000</pubDate>
</item>
<item>
<title>Can I use a virtual field as a template merge field? (usage= p)</title>
<link>https://overflow.efficy.io/?qa=5532/can-i-use-a-virtual-field-as-a-template-merge-field-usage-p</link>
<description>&lt;p&gt;Can I use a virtual field as a template merge field? &lt;br&gt;
SYS_FIELDS: (usage= p)&lt;/p&gt;

&lt;p&gt;Currently I get empty results when merged results.&lt;/p&gt;

&lt;p&gt;For example: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[$=PROJ.V_PRODUCTVALUE_Y1] or [$=PROJ.V_TOTALVALUE_Y1, FORMAT=&quot;,0.00&quot;]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Et cetera.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5532/can-i-use-a-virtual-field-as-a-template-merge-field-usage-p</guid>
<pubDate>Mon, 03 Aug 2020 09:27:58 +0000</pubDate>
</item>
<item>
<title>Use query for result value in virtual field</title>
<link>https://overflow.efficy.io/?qa=4873/use-query-for-result-value-in-virtual-field</link>
<description>&lt;p&gt;I've got a virtual field in a category. See screenshot. &lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=17095528798307630503&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
I used the &quot;1&quot; hardcoded as value, but I would like to use the query I defined. See code (in MacroLibraryCustom) below.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;VMKostenraming {[
&amp;lt;%RunQuery(id=&quot;VMKostenraming&quot;
,sql=&quot;select sum(price*quantity) as VMKostenraming from &amp;lt;#TABLE NAME=DOCU_PROD&amp;gt; where k_document = :param1&quot;
,store=&quot;36&quot;
,param1='%%GetKey()'
)%&amp;gt;
&amp;lt;input type=&quot;TEXT&quot; readonly &amp;lt;%GetField('$FIELDNAME$', category='$CATEGORY$', context=TEXT)%&amp;gt; id='$FIELDNAME$' value=&quot;1&quot;)%&amp;gt;
]}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So now I want to replace the 1 in the virtual field with the result from the query. But when trying to use GETFIELD I get an error that the field is not defined. How to do this with virtual fields?&lt;/p&gt;

&lt;p&gt;Thanks for your help!&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4873/use-query-for-result-value-in-virtual-field</guid>
<pubDate>Mon, 07 Oct 2019 11:46:51 +0000</pubDate>
</item>
</channel>
</rss>