0 votes

Hello,

I've written a runquery in the MacroListCustom.txt-file in the ListConsult.Appo
When i open the Agenda, the query is executed and i'm able to use the select-fields from the query (tried it with select 'test' as aa - and then show field aa with Getfield('aa', query=....)

How can i use the K_Actipon from an action in the parameters of the query so that the query-result is different for each action shown in the agenda.
See my Query below.

MANY thx.

ListConsult.Appo [
<%RunQuery(id=|AM|, store=|2|, SQL=|select SUM(F_TIME_SPENT_HOUR) as AMH,SUM(F_TIME_SPENT_MIN) as AMM from <#TABLE name='R_ACTI_PROD'> R_ACTI_PROD where R_ACTI_PROD.K_Action=:param1|, **PARAM1="%%Evaluate(|<%GetArgument('K_Action')%>|)"%**>
<%OnArgument(ArgValue="%%GetStoredParam('_ viewkind')", then="<%Macro('AgendaVisual')%>",
else="<%Macro('AgendaText')%>")%>
<%Macro('TaskPreview')%><%Macro("ContextMenu")%>].

closed with the note: Closed
asked in Efficy/ Client side by (114 points)
closed by

1 Answer

0 votes

Like I told you before, don't create queries in a loop. It's a very bad design for performance and memory consumption. Can't you collect all K_ACTIONS from the main query and use them all as parameter in a second query, for instance?

answered by (6.9k points)
1,173 questions
1,432 answers
1,726 comments
325 users