<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged detail</title>
<link>https://overflow.efficy.io/?qa=tag/detail</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to hide an event detail coming from Outlook Exchange to Edeal CRM ?</title>
<link>https://overflow.efficy.io/?qa=6391/how-hide-event-detail-coming-from-outlook-exchange-edeal-crm</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;

&lt;p&gt;I would like to help one of our clients to hide some details (Subject, description, place, etc.) of the event coming from Outlook Calendar (We're using the groupware synchronization task ! )&lt;br&gt;
Is there any way to make this happen in the sync model  ?&lt;/p&gt;

&lt;p&gt;Suggestions are welcome&lt;/p&gt;

&lt;p&gt;Thank you !&lt;/p&gt;
</description>
<category>E-Deal support</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6391/how-hide-event-detail-coming-from-outlook-exchange-edeal-crm</guid>
<pubDate>Thu, 09 Dec 2021 16:27:01 +0000</pubDate>
</item>
<item>
<title>COMP_COMP: Error after deleting Detail with custom Edit grid</title>
<link>https://overflow.efficy.io/?qa=5801/compcomp-error-after-deleting-detail-with-custom-edit-grid</link>
<description>&lt;p&gt;Hello, I get an error after deleting a COMP_COMP detail and clicking on Apply:&lt;br&gt;
&quot;Vind detail met sleutel &quot;50015999&quot; en relatie &quot;-1&quot; niet terug.&lt;br&gt;
Translated: Cannot find detail with key &quot;50015999&quot; and relation &quot;-1&quot;.&lt;br&gt;
(The key is the master key, by the way)&lt;/p&gt;

&lt;p&gt;I inserted this macro custom:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&quot;FormFieldsEditCustom.txt&quot;&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EntityRelationsGrid.Comp.Comp {[ &amp;lt;%GetRelationGrid(columndefs=&quot;RelationColumns&quot;, entity=&quot;$DETAIL$&quot;, noheader=&quot;true&quot;, columns=&quot;%%IfReadOnly(then='MAIN,FULLNAME', else='MAIN,COMMANDS,FULLNAME,F_COMP_COMPANYROLE')&quot;)%&amp;gt; ]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;AND&lt;br&gt;
&lt;em&gt;&quot;RelationColumnsCustom.txt&quot;&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;td.F_COMP_COMPANYROLE.Comp [&amp;lt;td&amp;gt;&amp;lt;%GetEdit(detail=&quot;Comp&quot;,detailkey=&quot;&amp;lt;#F=K_COMPANY2;context=TAG&amp;gt;&quot;,field=&quot;$FIELD$&quot;,type=&quot;lookup&quot;)%&amp;gt;&amp;lt;/td&amp;gt;]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What am I doing wrong here or what do I miss here?&lt;br&gt;
Thanks in advance&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5801/compcomp-error-after-deleting-detail-with-custom-edit-grid</guid>
<pubDate>Tue, 19 Jan 2021 09:01:50 +0000</pubDate>
</item>
<item>
<title>add detail to an existing entity</title>
<link>https://overflow.efficy.io/?qa=5358/add-detail-to-an-existing-entity</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;We would like to add a detail to an entity, but this entity is already created.&lt;br&gt;
To do that, we modified macro in MacroEditCustom.txt :&lt;br&gt;
EditRelationsList.Comp {[UserRelations;PrjrRelations]}&lt;/p&gt;

&lt;p&gt;But we got this error message : Invalid Detail &quot;Prjr&quot; for AddRelationButton function&lt;/p&gt;

&lt;p&gt;What are the next steps to make it work ?&lt;br&gt;
If we must modify database, can you give us table names and fields concerned ?&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5358/add-detail-to-an-existing-entity</guid>
<pubDate>Wed, 11 Mar 2020 15:02:25 +0000</pubDate>
</item>
<item>
<title>Customize GridColumns group with detail menu</title>
<link>https://overflow.efficy.io/?qa=4413/customize-gridcolumns-group-with-detail-menu</link>
<description>&lt;p&gt;Hi.&lt;/p&gt;

&lt;p&gt;In project consult page, I customised the tab where linked oppos are displayed.&lt;/p&gt;

&lt;p&gt;For each oppo linked, I had to display relation values between a custom entity and oppo.&lt;/p&gt;

&lt;p&gt;It look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=601053546079944618&quot; alt=&quot;relation between proj and oppo&quot;&gt;&lt;/p&gt;

&lt;p&gt;The custom:&lt;br&gt;
MacroConsult:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DetailGrid.Proj.Oppo {[
    &amp;lt;%GetDetailGrid(columndefs=&quot;GridColumns&quot;, entity=&quot;$DETAIL$&quot;, columns=&quot;%%Macro('DetailGridColumns')&quot;, sum=&quot;%%Macro('DetailGridSum')&quot;, group=&quot;NAME&quot;)%&amp;gt;
&amp;lt;%Macro(&quot;DetailMenu&quot;)%&amp;gt;
]}
DetailGridColumns.Proj.Oppo {[NAMEINDICATOR,F_TOTAL]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;NAMEINDICATOR is a field given by the customized SYS_QUERY&lt;/p&gt;

&lt;p&gt;Then to display the icon to get the edit relation menu:&lt;br&gt;
GridColumn:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;group {[
&amp;lt;tr class=&quot;group&quot;&amp;gt;
&amp;lt;td colspan=&quot;$COLUMNCOUNT$&quot;&amp;gt;
&amp;lt;span class=&quot;dropdown no-pip i-menu small&quot; data-dropdown=&quot;detail-menu&quot; data-args=&quot;&amp;lt;#G=$KEY$&amp;gt;&quot;&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;i class=&quot;i-&amp;lt;#ACTION&amp;gt;&quot; data-msg=&quot;group;&amp;lt;#ACTION&amp;gt;;&amp;lt;#HASH&amp;gt;&quot;&amp;gt;&amp;lt;/i&amp;gt;
&amp;lt;#F;context=TEXT&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And, once again in MacroConsult:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DetailMenu.Proj.Oppo {[&amp;lt;%GetPopupMenu(id=&quot;detail-menu&quot;, class=&quot;has-icons small&quot;, ulargs='data-channel=&quot;detailmenu&quot;', count=&quot;4&quot;,
text1=&quot;Edit #DETAIL&quot;, image1=&quot;i-edit&quot;,
message1=&quot;consult;{dropdownKey};#DETAIL&quot;,
text2=&quot;Duplicate&quot;, image2=&quot;i-Dupl&quot;,
message2=&quot;duplicateOppoFromProj;{dropdownKey}&quot;,
text3=&quot;Edit relation&quot;, image3=&quot;i-edit&quot;,
message3=&quot;editRelation;#ENTITY;#KEY;#DETAIL;{dropdownKey}&quot;,
text4=&quot;Delete relation&quot;, image4=&quot;i-delete&quot;,
message4=&quot;deleteRelation;#ENTITY;#KEY;#DETAIL;{dropdownKey}&quot;
)%&amp;gt;]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have the menu:&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=13404056964249031169&quot; alt=&quot;relation menu&quot;&gt;&lt;/p&gt;

&lt;p&gt;And when I click on &quot;Edit relation&quot;, I have this error message:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=5768442693444696272&quot; alt=&quot;error message&quot;&gt;&lt;/p&gt;

&lt;p&gt;And here is what I have in the url:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;http://127.0.0.1:5112/crm/edit?page=edit/Relation&amp;amp;action=refreshOpener&amp;amp;entity=Proj&amp;amp;key=3316&amp;amp;detail=Oppo&amp;amp;detailkey=%3C#G=K_OPPORTUNITY%3E&quot;&gt;http://127.0.0.1:5112/crm/edit?page=edit/Relation&amp;amp;action=refreshOpener&amp;amp;entity=Proj&amp;amp;key=3316&amp;amp;detail=Oppo&amp;amp;detailkey=%3C#G=K_OPPORTUNITY%3E&lt;/a&gt;&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4413/customize-gridcolumns-group-with-detail-menu</guid>
<pubDate>Wed, 05 Jun 2019 17:02:11 +0000</pubDate>
</item>
<item>
<title>Get only what's change during the edit context</title>
<link>https://overflow.efficy.io/?qa=4023/get-only-whats-change-during-the-edit-context</link>
<description>&lt;p&gt;Hello Efficy Team, &lt;/p&gt;

&lt;p&gt;I got a complex process where I need to &lt;em&gt;do something&lt;/em&gt; with the &quot;new element&quot; of a detailDataSet, or the deleted elements of the detailDataSet during the edit context.&lt;/p&gt;

&lt;p&gt;What is the best way retrieve only those element ? &lt;/p&gt;

&lt;p&gt;Here is what I did : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    var k_project = Efficy.getEditKey(editHandle);
var relationTable = Efficy.entityCatalog.getRelationEntityTableName(ntProj, TEntityHandle);
var kElement = Efficy.entityCatalog.keyFieldName(TEntityHandle);

var dsDetails = Efficy.sqlQueryDataSet('select * from ' + relationTable + ' where k_project = :param1', k_project, 45);
var newDetails = Efficy.getDetailDataSet(editHandle, TEntityHandle);

var changesInTheEditContext = [];

if(dsDetails || !dsDetails.isEmpty()) {

    // the project is already committed. We need to get only the &quot;new&quot; one
    // for that, we filter the &quot;new one&quot; based on the &quot;old one&quot;

    var existing = [];
    dsDetails.first();
    while (!dsDetails.eof()) {
        existing.push(dsDetails.fieldByName(kElement).asFloat);
        dsDetails.next();
    }

    // ho yeah it is ugly. But seems that &quot;not in ()&quot; does not work
    newDetails.filter = kElement +' &amp;lt;&amp;gt; ' + existing.join(' AND ' +  kElement +  ' &amp;lt;&amp;gt; ');
    newDetails.FilterOptions = existing.length;
    newDetails.Filtered = true;

}

// then we get, for each &quot;new one&quot;, useful information's : entity, key, name

if(newDetails.isEmpty() || !newDetails) return false;
newDetails.first();

while(!newDetails.eof()) {

    changesInTheEditContext.push({
        entity : Efficy.entityCatalog.getEntityName(TEntityHandle),
        key : newDetails.fieldByName(kElement).asFloat,
        name : getName(newDetails.fieldByName(kElement).asFloat, TEntityHandle),
        operation : 'add'
    })

    newDetails.next();
}

newDetails.Filtered = false;

// we also need to detect the opposite : a contact deleted during the edit context
// we use the same ticks, but in the opposite (current detailDataSet filter the SQL)

if(dsDetails || !dsDetails.isEmpty()) {

    var fromRelationTable = [];

    newDetails.first();
    while (!newDetails.eof()) {

        fromRelationTable.push(newDetails.fieldByName(kElement).asFloat);
        newDetails.next();

    }

    // ho yeah it is ugly. But seems that &quot;not in ()&quot; does not work
    dsDetails.filter = kElement +' &amp;lt;&amp;gt; ' + fromRelationTable.join(' AND ' +  kElement +  ' &amp;lt;&amp;gt; ');
    dsDetails.FilterOptions = fromRelationTable.length;
    dsDetails.Filtered = true;

    if(dsDetails.isEmpty() || !dsDetails) return false;
    dsDetails.first();

    while(!dsDetails.eof()) {

        changesInTheEditContext.push({
            entity : Efficy.entityCatalog.getEntityName(TEntityHandle),
            key : dsDetails.fieldByName(kElement).asFloat,
            // name : getName(newDetails.fieldByName(kElement).asFloat, TEntityHandle), -- we don't need the name, he's already displayed
            operation : 'delete'
        })

        dsDetails.next();
    }

    dsDetails.Filtered = true;

}

return changesInTheEditContext;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is there, by any chance, a way to get those change in a more &quot;Efficy way&quot; than comparing two dataSet ? &lt;/p&gt;

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

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4023/get-only-whats-change-during-the-edit-context</guid>
<pubDate>Tue, 12 Mar 2019 07:49:17 +0000</pubDate>
</item>
<item>
<title>Show different Menu on detail grid according to value in grid line</title>
<link>https://overflow.efficy.io/?qa=2738/show-different-menu-on-detail-grid-according-value-grid-line</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm searching for a way to show different DetailMenu on each grid line depending on certain value on that line.&lt;/p&gt;

&lt;p&gt;it's on grid of products linked to project on consult, so if the product is from family X then the detail menu (the small men on the left side of the line where we can edit, or delete the relation) has delete and edit relation button. While if product is from Family Y then just show &quot;Edit Relation&quot; button on the menu.&lt;/p&gt;

&lt;p&gt;Any one has an idea for such implementation.&lt;/p&gt;

&lt;p&gt;Thank you in-advance for help and advice.&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=2738/show-different-menu-on-detail-grid-according-value-grid-line</guid>
<pubDate>Thu, 02 Nov 2017 18:12:19 +0000</pubDate>
</item>
<item>
<title>Set timeline als default detail in Consult that it ALWAYS opens</title>
<link>https://overflow.efficy.io/?qa=1558/set-timeline-als-default-detail-in-consult-that-always-opens</link>
<description>&lt;p&gt;Set timeline als default detail in Consult that it ALWAYS opens on the timeline when consulting a Contact / Company ...&lt;/p&gt;

&lt;p&gt;How best to do this ?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1558/set-timeline-als-default-detail-in-consult-that-always-opens</guid>
<pubDate>Tue, 26 Apr 2016 13:01:20 +0000</pubDate>
</item>
<item>
<title>Efficy customs 2014 - Problem with DetailSpecial display handling (solved)</title>
<link>https://overflow.efficy.io/?qa=52/efficy-customs-problem-detailspecial-display-handling-solved</link>
<description>&lt;p&gt;&lt;strong&gt;[Fixed. See below.]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I have adapted a custom wich appears in the Projects entity, in a new tab (a financial dashboard). Everything works fine, but still, I meet an impossibility to display normaly this dashboard by clicking on the new tab. Here is everything, in detail:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MacroConsultCustom.txt&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &quot;Avalable details&quot; section, &lt;em&gt;DetailTabsButtons.Pro&lt;/em&gt; contains the new tab (&lt;em&gt;Financial&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;In the &quot;General page&quot; layout, &quot;ConsultQueries.Proj.Financial&quot; all the required Queries (Runquery)...&lt;/li&gt;
&lt;li&gt;In the &quot;Consult Detail Area&quot; section, &lt;em&gt;DetailTabs&lt;/em&gt; contains the Image, Label and Title definitions of my new tab&lt;/li&gt;
&lt;li&gt;In the &quot;Consult Detail Content&quot; section, &lt;em&gt;DetailSwitch.Proj.Financial&lt;/em&gt; uses the macro &quot;DetailSpecial&quot;&lt;/li&gt;
&lt;li&gt;Still in the &quot;Consult Detail Content&quot; section, &lt;em&gt;DetailSpecial.Proj.Financial&lt;/em&gt; contains the front-end code of the dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What does not work :&lt;/strong&gt;&lt;br&gt;
If I click on my tab, the screen goes white, displaying a top frame, which only contains the value of the first Efficy DB field to be displayed (returned by a query). The code is a javascript line :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var poin = &amp;lt;%OnField(&quot;POIN&quot;,query=&quot;POIN&quot;,then=&quot;0&quot;,else=&quot;%%GetField('POIN',query='POIN')&quot;)%&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... so all I see on the screen is the value of 'POIN'. No more interface, no more Efficy...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What works :&lt;/strong&gt;&lt;br&gt;
If I remove all the code present in &quot;DetailSpecial.Proj.Financial&quot;, replacing it by &quot;Toto&quot;, and save the custom, I'm suddenly perfectly able to display my tab and its content (Toto) : it looks fine.&lt;br&gt;
But here is the 'straaange&quot; : if I put my display code back in &quot;DetailSpecial.Proj.Financial&quot;, save the custom, and refresh the page by using F5, my dashboard appears!&lt;/p&gt;

&lt;p&gt;Then, if I log out, login again, and try to go to the Financial dashboard, exerything explodes again.&lt;/p&gt;

&lt;p&gt;Any hint ? Could it be about delaying the execution of something somewhere ? Any idea ?&lt;/p&gt;

&lt;p&gt;Thanks in advance, and thanks for reading that looooooong question. ;-)&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;strong&gt;UPDATE : FIXED on 16/10/2014&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All my problem were due to the usage of some &quot;document.write()&quot; in the javascript of the custom I had to adapt to 2014 edition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem was:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;« document.write » can't be called from an asynchronous script, because it's detached from the document. As Efficy 2014 uses async scripts for the display, its usage can write over the top of global efficy responsive display template. The result if often a blank page, displaying only what the first « document.write » of your custom has to display, and ignoring the rest of your script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The solution that worked for me:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ban the use of any document.write in 2014 customs. I had toimplement some « .innerHTML » properties to populate blank &lt;span&gt; tags or  tags. This approach does not break the display flow of Efficy 2014.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple example of replacement:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;
    &amp;lt;tr&amp;gt;
        &amp;lt;td&amp;gt;Total PO Budget :&amp;lt;/td&amp;gt;
        &amp;lt;td class=&quot;right-bold&quot;&amp;gt;
            &amp;lt;script&amp;gt;
                var poin = &amp;lt;%OnField(&quot;POIN&quot;,query=&quot;POIN&quot;,then=&quot;0&quot;,else=&quot;%%GetField('POIN',query='POIN')&quot;)%&amp;gt;;
                var total = (parseInt(poin,10));
                document.write(total);
            &amp;lt;/script&amp;gt; €
        &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;
    &amp;lt;tr&amp;gt;
        &amp;lt;td&amp;gt;Total PO Budget :&amp;lt;/td&amp;gt;
        &amp;lt;td class=&quot;right-bold&quot;&amp;gt;&amp;lt;span id=&quot;totalPOIN&quot;&amp;gt;&amp;lt;/span&amp;gt;
        &amp;lt;script&amp;gt;
            var poin = &amp;lt;%OnField(&quot;POIN&quot;,query=&quot;POIN&quot;,then=&quot;0&quot;,else=&quot;%%GetField('POIN',query='POIN')&quot;)%&amp;gt;;
            var total = (parseInt(poin,10));
            //document.write(total);
            document.getElementById(&quot;totalPOIN&quot;).innerHTML = total;
        &amp;lt;/script&amp;gt; €
        &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;More advanced example of replacement, using &amp;lt;#repeat&amp;gt; loops:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;
    &amp;lt;%GetDataGrid(query=&quot;TasksStatus&quot;,TemplateText=|&amp;lt;#repeat&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;#F=role&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td class=&quot;center-txt no-warp&quot;&amp;gt;&amp;lt;#I=consumed;#EMPTY=0;#ELSE=&amp;lt;#F=consumed&amp;gt;&amp;gt; €&amp;lt;/nowarp&amp;gt; / &amp;lt;#F=budget&amp;gt; €&amp;lt;/td&amp;gt;
            &amp;lt;td class=&quot;center-txt no-warp&quot;&amp;gt;&amp;lt;#F=DONE&amp;gt; / &amp;lt;#F=forecast&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;script&amp;gt;
                    if ((&amp;lt;#F=DONE&amp;gt;) &amp;gt; (&amp;lt;#F=forecast&amp;gt;))
                        document.write('&amp;lt;img src=&quot;http://chart.apis.google.com/chart?chbh=a&amp;amp;chs=200x12&amp;amp;cht=bhg&amp;amp;chco=FF0000&amp;amp;chds=0,&amp;lt;#F=forecast&amp;gt;&amp;amp;chd=t:&amp;lt;#F=done&amp;gt;&quot; width=&quot;200&quot; height=&quot;12&quot; alt=&quot;&quot; /&amp;gt;'); 
                    else 
                        document.write('&amp;lt;img src=&quot;http://chart.apis.google.com/chart?chbh=a&amp;amp;chs=200x12&amp;amp;cht=bhg&amp;amp;chco=049900&amp;amp;chds=0,&amp;lt;#F=forecast&amp;gt;&amp;amp;chd=t:&amp;lt;#F=done&amp;gt;&quot; width=&quot;200&quot; height=&quot;12&quot; alt=&quot;&quot; /&amp;gt;');
                &amp;lt;/script&amp;gt;
                &amp;lt;span class=&quot;no-warp&quot;&amp;gt;&amp;lt;script&amp;gt;var percentage = Math.round((&amp;lt;#F=DONE&amp;gt;/&amp;lt;#F=FORECAST&amp;gt;)*100); document.write(&quot; &quot;+percentage)&amp;lt;/script&amp;gt; %&amp;lt;/span&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;/#repeat&amp;gt;|)%&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table&amp;gt;
    &amp;lt;script&amp;gt; var idCmpt=0; &amp;lt;/script&amp;gt;
    &amp;lt;%GetDataGrid(query=&quot;TasksStatus&quot;,TemplateText=|&amp;lt;#repeat&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;#F=role&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td class=&quot;center-txt no-warp&quot;&amp;gt;&amp;lt;#I=consumed;#EMPTY=0;#ELSE=&amp;lt;#F=consumed&amp;gt;&amp;gt; €&amp;lt;/nowarp&amp;gt; / &amp;lt;#F=budget&amp;gt; €&amp;lt;/td&amp;gt;
            &amp;lt;td class=&quot;center-txt no-warp&quot;&amp;gt;&amp;lt;#F=DONE&amp;gt; / &amp;lt;#F=forecast&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;img id=&quot;idChartToReplace&quot; src=&quot;&quot; width=&quot;200&quot; height=&quot;12&quot; alt=&quot;&quot; /&amp;gt;
                &amp;lt;script&amp;gt;
                    var divCharId = &quot;TasksStatusChartImg&quot;+idCmpt;
                    document.getElementById(&quot;idChartToReplace&quot;).id = divCharId ;
                    if ((&amp;lt;#F=DONE&amp;gt;) &amp;gt; (&amp;lt;#F=forecast&amp;gt;)) {
                        document.getElementById(divCharId).src = &quot;http://chart.apis.google.com/chart?chbh=a&amp;amp;chs=200x12&amp;amp;cht=bhg&amp;amp;chco=FF0000&amp;amp;chds=0,&amp;lt;#F=forecast&amp;gt;&amp;amp;chd=t:&amp;lt;#F=done&amp;gt;&quot;; 
                    }
                    else {
                        document.getElementById(divCharId).src = &quot;http://chart.apis.google.com/chart?chbh=a&amp;amp;chs=200x12&amp;amp;cht=bhg&amp;amp;chco=049900&amp;amp;chds=0,&amp;lt;#F=forecast&amp;gt;&amp;amp;chd=t:&amp;lt;#F=done&amp;gt;&quot;; 
                    }
                &amp;lt;/script&amp;gt;
                &amp;lt;span id=&quot;idChartPercentToReplace&quot; class=&quot;no-warp&quot;&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;script&amp;gt;
                    var spanCharPercentId = &quot;TasksStatusChartPercent&quot;+idCmpt;
                    document.getElementById(&quot;idChartPercentToReplace&quot;).id = spanCharPercentId;
                    var percentage = Math.round((&amp;lt;#F=DONE&amp;gt;/&amp;lt;#F=FORECAST&amp;gt;)*100); 
                    //document.write(&quot; &quot;+percentage+&quot; %&quot;);
                    document.getElementById(spanCharPercentId).innerHTML = &quot; &quot;+percentage+&quot; %&quot;;
                    idCmpt++;
                &amp;lt;/script&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;/#repeat&amp;gt;|)%&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=52/efficy-customs-problem-detailspecial-display-handling-solved</guid>
<pubDate>Wed, 15 Oct 2014 11:37:56 +0000</pubDate>
</item>
</channel>
</rss>