<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged lookup</title>
<link>https://overflow.efficy.io/?qa=tag/lookup</link>
<description>Powered by Question2Answer</description>
<item>
<title>Can we add a not standard translation for a lookup value ?</title>
<link>https://overflow.efficy.io/?qa=6939/can-we-add-a-not-standard-translation-for-a-lookup-value</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Can I had a translation in IT (Italian) for my custom lookup?&lt;/p&gt;

&lt;p&gt;The &quot;Add Langage Field&quot; of the designer doesn't offer IT as a choice for translation. Can I do it in another way? Or trought SQL?&lt;/p&gt;

&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6939/can-we-add-a-not-standard-translation-for-a-lookup-value</guid>
<pubDate>Tue, 18 Jul 2023 11:33:09 +0000</pubDate>
</item>
<item>
<title>getLookupValueFromKey</title>
<link>https://overflow.efficy.io/?qa=5436/getlookupvaluefromkey</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In workflow script i need to read value from lookup record.&lt;br&gt;
To do that, i used function API getLookupValueFromKey. &lt;br&gt;
Thus the code is : &lt;br&gt;
var labelTypeRelation = Efficy.getLookupValueFromKey(Efficy.entityCatalog.tableIDFromName('LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP'), 'F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP', CompDataSet.fieldByName('F&lt;em&gt;TYPE&lt;/em&gt;RELATION').asFloat);&lt;/p&gt;

&lt;p&gt;But when i run script, i get this error message :&lt;br&gt;
Cannot fetch Lookup Table Values on table &quot;LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP.F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP&quot;&lt;/p&gt;

&lt;h2&gt;ErrorContext&lt;/h2&gt;

&lt;p&gt;EEfficyLookupTableError 1806&lt;br&gt;
(ENTT-1515) LookupTableManager&lt;br&gt;
FieldName &quot;0&quot; not found in SYS_FIELDS&lt;/p&gt;

&lt;h2&gt;Error&lt;/h2&gt;

&lt;p&gt;EEfficyLookupTableError 1805&lt;br&gt;
(ENTT-1512) LookupTableManager&lt;br&gt;
Cannot fetch Lookup Table Values on table &quot;LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP.F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP&quot;&lt;/p&gt;

&lt;h2&gt;Error&lt;/h2&gt;

&lt;p&gt;I managed to find solution with query sql but i would like to use Efficy API.&lt;/p&gt;

&lt;p&gt;Can you help me ?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;Romain&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5436/getlookupvaluefromkey</guid>
<pubDate>Thu, 02 Jul 2020 12:37:06 +0000</pubDate>
</item>
<item>
<title>Use entity table as a lookup</title>
<link>https://overflow.efficy.io/?qa=4511/use-entity-table-as-a-lookup</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Is it possible to define a lookup field on an entity table (for example K_LOOKUPFIELD=10000 for COMPANIES), and to filter the results ?&lt;/p&gt;

&lt;p&gt;On CompEdit I need to have a lookup field to choose another company :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The field will contain the key of the selected company&lt;/li&gt;
&lt;li&gt;Only Companies with 'F_GROUPE=1' can be selected, so I need to filter&lt;br&gt;
the lookup result&lt;/li&gt;
&lt;li&gt;This field can be used in QUERIES and display the name of the&lt;br&gt;
selected company (same on the CompEdit form)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried but I use two fields...&lt;br&gt;
The first one :&lt;br&gt;
F&lt;em&gt;MEMBRE&lt;/em&gt;GROUPE, used on the CompEdit form with the definition below&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=8515594803348119222&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;field.LOOKUP_MEMBRE_GROUP{[
    &amp;lt;%RunQuery(id='getGroup', store='1', sql='SELECT K_COMPANY, NAME FROM &amp;lt;#TABLE NAME=&quot;COMPANIES&quot;&amp;gt; WHERE F_GROUPE = 1')%&amp;gt;

    &amp;lt;%GetDataGrid(query=&quot;getGroup&quot;, count=-1, TemplateText=&quot;&amp;lt;select name='F_MEMBRE_GROUPE' id='F_MEMBRE_GROUPE'&amp;gt;
        &amp;lt;option value='0' selected&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;#repeat&amp;gt;
        &amp;lt;option value='&amp;lt;#F=K_COMPANY&amp;gt;' &amp;lt;%OnField('F_MEMBRE_GROUPE', value='&amp;lt;#F=K_COMPANY&amp;gt;', then='selected')%&amp;gt; &amp;gt;&amp;lt;#F=NAME&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;/#repeat&amp;gt;
    &amp;lt;/select&amp;gt;&quot;
    )%&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second one : V_CENTRAL, used in QUERY and view (on the right) :&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=10537936421406913655&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update SYS_FIELDS set
NAME='V_CENTRALE',
DATATYPE='A',
DATALENGTH=255,
USAGE='P',
LOOKUPASSOCIATE='=select NAME from COMPANIES cent where cent.K_COMPANY=COMPANIES.F_MEMBRE_GROUPE'
where K_TABLE=10000 and K_FIELD=308
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thanks! :)&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4511/use-entity-table-as-a-lookup</guid>
<pubDate>Thu, 04 Jul 2019 10:26:25 +0000</pubDate>
</item>
<item>
<title>Join a lookup table in a custom view</title>
<link>https://overflow.efficy.io/?qa=4195/join-a-lookup-table-in-a-custom-view</link>
<description>&lt;p&gt;Here's the context:&lt;/p&gt;

&lt;p&gt;I have a field called &lt;code&gt;F_FUNCTION&lt;/code&gt; in the table &lt;code&gt;CONT_COMP&lt;/code&gt;. This field is an integer value refering to the lookup table &lt;code&gt;LK_CONT_COMP_FUNCTION&lt;/code&gt;. In this lookup there is obviously the field &lt;code&gt;F_FUNCTION&lt;/code&gt; and there's no problem getting its value. &lt;/p&gt;

&lt;p&gt;But in the very same lookup, there's another field called &lt;code&gt;F_STATUS&lt;/code&gt; (for each &lt;code&gt;F_FUNCTION&lt;/code&gt; there is a &lt;code&gt;F_STATUS&lt;/code&gt;). This field contains values like &quot;gold&quot;/&quot;silver&quot;/&quot;aucun&quot; and I'd like to get those values in my custom view.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=6403084654780643134&quot; alt=&quot;Lookup picture&quot;&gt;&lt;/p&gt;

&lt;p&gt;So my goal would be to make a join between the &lt;code&gt;CONT_COMP&lt;/code&gt; table and the &lt;code&gt;LK_CONT_COMP_FUNCTION&lt;/code&gt; lookup table so I can have access to values, stored in other columns of the lookup table, in my custom view.&lt;/p&gt;

&lt;p&gt;Is there a simple way to achieve that?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4195/join-a-lookup-table-in-a-custom-view</guid>
<pubDate>Tue, 07 May 2019 09:22:05 +0000</pubDate>
</item>
<item>
<title>Insert a value in a lookup table during the datasynchro</title>
<link>https://overflow.efficy.io/?qa=3976/insert-a-value-in-a-lookup-table-during-the-datasynchro</link>
<description>&lt;p&gt;Hello Efficy Team, &lt;/p&gt;

&lt;p&gt;A customer have a big Excel file to import with a DataSynchro. My quesion is simple : how, with an Efficy method / function, could we insert a value in a Lookup if this value does not exist ? &lt;/p&gt;

&lt;p&gt;Last time I had to do that, I did it with an insert in SQL :( &lt;br&gt;
Not really clean.&lt;/p&gt;

&lt;p&gt;Is there a more &quot;efficient&quot; way to do that ? &lt;/p&gt;

&lt;p&gt;Thanks in advance, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3976/insert-a-value-in-a-lookup-table-during-the-datasynchro</guid>
<pubDate>Thu, 21 Feb 2019 16:04:53 +0000</pubDate>
</item>
<item>
<title>Create a lookup table from scripts</title>
<link>https://overflow.efficy.io/?qa=2879/create-a-lookup-table-from-scripts</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;To install a custom module to an other base I have to create lookup tables in the new base. &lt;br&gt;
Since the dbstaging doesn't work fine in this context (the iscustom field is not taken into consideration plus the keygen is not managed by this tool and since in the new base the Key of the lookup table is not the same)&lt;/p&gt;

&lt;p&gt;I had to make it work so this is the script I finally used. Please note that The keygen will works now, plus the ISCUSTOM field issue has been fixed as well.&lt;/p&gt;

&lt;p&gt;I would recommand to perticulary look after the use of ADMIN user and schema in my code because this part is not dynamic.&lt;/p&gt;

&lt;p&gt;NB: I chose to ignore the sys label of my table since it's a configuration table&lt;/p&gt;

&lt;p&gt;So far it works fine (on MSSQL) cheers,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EXECUTE AS USER = 'ADMIN'

create table LK_DP_HYPERLINKS (
    K_DP_HYPERLINKS INTEGER NOT NULL,
    K_SORT INTEGER NULL,
    K_LABEL INTEGER NULL,
    DISABLED VARCHAR(1) NOT NULL DEFAULT '0',
    F_VALUE NVARCHAR(128) NULL,
    F_URL NVARCHAR(255) NULL,
    F_SECURITY NVARCHAR(32) NULL, constraint PKLK_DP_HYPERLINKS Primary Key (K_DP_HYPERLINKS)
)

declare @K1 float
exec admin.GETNEWKEY @FIELDNAME = 'K_TABLE', @NEWIDVAL = @K1 OUTPUT

Insert into ADMIN.SYS_TABLES (K_TABLE, NAME, D_CREATE, D_CHANGE, KIND, K_LABEL, RANKING, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 'LK_DP_HYPERLINKS', GETDATE(), GETDATE(), 'L', NULL, '0', GETDATE(), 0, '1')

   Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, USAGE, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1, 'K_DP_HYPERLINKS', getdate(), getdate(), 'I', '0', 'K', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 2, 'K_SORT', getdate(), getdate(), 'I', '1', '1', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 3, 'K_LABEL', getdate(), getdate(), 'I', '1', '1', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBDEFAULT, DBALLOWNULL, DEFAULTVALUE, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 4, 'DISABLED', getdate(), getdate(), 'L', '0', '0', '0', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1924, 'F_VALUE', getdate(), getdate(), 'A', 128, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1925, 'F_URL', getdate(), getdate(), 'A', 255, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1926, 'F_SECURITY', getdate(), getdate(), 'A', 32, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2879/create-a-lookup-table-from-scripts</guid>
<pubDate>Mon, 15 Jan 2018 12:08:16 +0000</pubDate>
</item>
<item>
<title>Would anyone have the postcode file for UK?</title>
<link>https://overflow.efficy.io/?qa=2662/would-anyone-have-the-postcode-file-for-uk</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
Would anyone have the postcode/zipcode file for UK? (ready to import in DB even better)&lt;br&gt;
Many tkx&lt;br&gt;
Kind regards&lt;br&gt;
Frédéric&lt;/p&gt;
</description>
<category>Efficy Designer (Conficy)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2662/would-anyone-have-the-postcode-file-for-uk</guid>
<pubDate>Fri, 25 Aug 2017 09:05:07 +0000</pubDate>
</item>
<item>
<title>Automatically fill in the province by postcode</title>
<link>https://overflow.efficy.io/?qa=2567/automatically-fill-in-the-province-by-postcode</link>
<description>&lt;p&gt;Hi Team,&lt;/p&gt;

&lt;p&gt;Has anybody ever done this? Simply fill in a custom &quot;province&quot; field depending on the postcode.&lt;br&gt;
Is there a database with provinces easy to match with our current postcode lookup?&lt;/p&gt;

&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2567/automatically-fill-in-the-province-by-postcode</guid>
<pubDate>Fri, 16 Jun 2017 11:27:17 +0000</pubDate>
</item>
<item>
<title>Width of the category-lookup</title>
<link>https://overflow.efficy.io/?qa=1835/width-of-the-category-lookup</link>
<description>&lt;p&gt;There is a customer who wants to make the dropdownlists for a Lookup field in a category wider. They currently use Efficy 2012 and in that version this was implemented as a custom.  &lt;/p&gt;

&lt;p&gt;Is there any possibility to customise that in Efficy 10th?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1835/width-of-the-category-lookup</guid>
<pubDate>Thu, 25 Aug 2016 12:53:11 +0000</pubDate>
</item>
<item>
<title>Build 6640: pickListSearch in category</title>
<link>https://overflow.efficy.io/?qa=1344/build-6640-picklistsearch-in-category</link>
<description>&lt;p&gt;We found a flaw in build 6640, due to a remark of a customer after migration.&lt;/p&gt;

&lt;p&gt;This Is according to a lookup in a category with the Edit style: Lookup-up with search window (this lookup has more than 1500 records).&lt;/p&gt;

&lt;p&gt;In a category it wants to use the data-msg=&quot;pickListSearch;….” but this function doesn’t exists in the build.&lt;br&gt;
So it looks like we didn’t migrate this function, because it’s only present in the efficy.dll.&lt;/p&gt;

&lt;p&gt;I ask this because I think it is a high urgency case, the customer uses this dropdowns in multiple ways. &lt;br&gt;
Because the lookup has 1500 records there is no work-around.&lt;/p&gt;

&lt;p&gt;Anybody has a solution for this?&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Michael de Groot&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1344/build-6640-picklistsearch-in-category</guid>
<pubDate>Tue, 16 Feb 2016 13:54:17 +0000</pubDate>
</item>
<item>
<title>Filter Acc_Accounts as lookup</title>
<link>https://overflow.efficy.io/?qa=1238/filter-accaccounts-as-lookup</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm using lookup acc_accounts in a custom lookup field, and i want to filter this list to show only the users (not the groups). the custom field is in category, so i think FORMS can be used here.&lt;/p&gt;

&lt;p&gt;Please let me know your suggestion and advises.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1238/filter-accaccounts-as-lookup</guid>
<pubDate>Mon, 18 Jan 2016 15:05:02 +0000</pubDate>
</item>
<item>
<title>What is the syntax to display the R_VALUE of a CATEGORY LOOKUP into a form ?</title>
<link>https://overflow.efficy.io/?qa=1023/what-the-syntax-display-the-rvalue-category-lookup-into-form</link>
<description>&lt;p&gt;I try to display into the project consultation form the value of a lookup by key into a category.&lt;/p&gt;

&lt;p&gt;The field is an F&lt;em&gt;XXX or je veux le R&lt;/em&gt;F_XXX.&lt;br&gt;
Of course I can create a virtual field to get the information of my category but I imagine that it all possible to do it easily just by using the right tag. &lt;/p&gt;

&lt;p&gt;By default it's CATEGORY. I tried LOOKUP but without success. Not better with the following combinaison CATEGORYLOOKUP or CATEGORY LOOKUP.&lt;/p&gt;

&lt;p&gt;Any quick solution ?   &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1023/what-the-syntax-display-the-rvalue-category-lookup-into-form</guid>
<pubDate>Fri, 18 Dec 2015 13:46:26 +0000</pubDate>
</item>
<item>
<title>Lookup menu doesn't show all values</title>
<link>https://overflow.efficy.io/?qa=664/lookup-menu-doesnt-show-all-values</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm setting a lookup field to list contains 1700 option, but on Edit window only almost 560 options are shown and the rest are not there (i can't search them, it's &quot;Lookup with search window&quot;).&lt;/p&gt;

&lt;p&gt;Please advise, is it bug? is there some work around to get all the values in the list?&lt;/p&gt;

&lt;p&gt;Thank you.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=664/lookup-menu-doesnt-show-all-values</guid>
<pubDate>Mon, 24 Aug 2015 11:33:15 +0000</pubDate>
</item>
</channel>
</rss>