0 votes

Hi all!

I need to integrate the result of a query into a new widget.
What's the best practice to do this? There is nothing in edn!?

This is what I did, but I think I am missing something here:

Edit MacroWidgetsCustom.txt and add somthing like:

CustomerAnniversaries {[<%LoadScript("serverscripts/Global.js")%>                                     
    <%RunQuery(id="CustomerAnniversaries", store="59", SQL="exec  ADMINALS.CUSTOM_CONT_ANNIVERSARIES :p1;", Param1="%%GetUserKey()")%>
    <%GetDataGrid(query="CustomerAnniversaries", columndefs="GridColumns.txt", entity="CONT", noheader=true, count=-1, columns="SampleColumn1,SampleColumn2,SampleColumn3,SampleColumn4")%>

Then edit:MacroDashBoardCustom.txt and add

<%Macro("WidgetTemplate59", $MACRO$="TodayWidget", $COLLAPSE$="0")%>


ContainerWidgetsDefault3 {[
<%Macro("WidgetTemplate59", $MACRO$="TodayWidget", $COLLAPSE$="0")%>

"Refresh Settings" in Admin....

Bute the Widget won't show up the the widget list ...
What is wrong here?

Thank you

asked in Efficy/ Client side by (177 points)

1 Answer

+1 vote

Hello Tim.

Don't forget to update pages\dialog\WidgetsToday.htm with the additional WidgetTemplate59

<div id="widgetList" class="row">
    <%Macros('WidgetTemplate7;WidgetTemplate8;WidgetTemplate9;WidgetTemplate12;WidgetTemplate17;WidgetTemplate18;WidgetTemplate19;WidgetTemplate20;WidgetTemplate21;WidgetTemplate59', $MACRO$='TodayWidgetLibraryTitle')%>

Then you can select it.

answered by (7.4k points)
OK thank you, missed that one!
However is there a "Widget howto?"
1,248 questions
1,518 answers
328 users