Back to All

Conditional confirmation output

I have a script that can return 2 different table output

How could make a condition to show only certain table or even better would be just format tableheader to have just either result headers?

block formContent

+formElement({
type: "agentTaskLog",
autorefresh: 2000
})

+formElement({
	charset: "utf8",
	type: "agentTaskSubmitResult",
	format: "table",
	tableHeader: "PVM,Sentteri_Id,Konenimi,System,Toimenpide,Lopputulos,Viivakoodi",
	loadingText: "Please wait while getting Events from selected computer...",
	autorefresh: 2000

})

+formElement({
	charset: "utf8",
	type: "agentTaskSubmitResult",
	format: "table",
	tableHeader: "PVM,Konenimi,Konenimi,AD_Terminated,Verkko_Terminated,Laiterekisteri_Terminated,SCCM_Terminated",
	loadingText: "Please wait while getting Events from selected computer...",
	autorefresh: 2000

})