<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged value</title>
<link>https://overflow.efficy.io/?qa=tag/value</link>
<description>Powered by Question2Answer</description>
<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>Lock document based on field value</title>
<link>https://overflow.efficy.io/?qa=3339/lock-document-based-on-field-value</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm searching for a way to lock a document based on some value in the document itself, so if this value is 1 the document should be locked (no matter if someone is using it or not), apparently in MacroEdit it's using macro &quot;IfReadOnly&quot; to disable fields and &quot;lock.htm&quot; page to check the locking status using macro &quot;GetLockStatus&quot;, so from where Efficy knows if this document is locked or not? and can we manipulate this process to make it based on 2 criteria only for documents (so if flag value is 1 or another user is editing the document then lock it)&lt;/p&gt;

&lt;p&gt;Thank you for your help and advise in advance.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3339/lock-document-based-on-field-value</guid>
<pubDate>Thu, 21 Jun 2018 11:34:53 +0000</pubDate>
</item>
</channel>
</rss>