1
Automation Interface, Add-Ins and Tools / Custom SQL Query passing EAGUID or Scenario?
« on: December 21, 2023, 09:08:37 pm »
Hi,
I'm trying to access the EAGUID to filter per scenario in a way like the #OBJECTID# is being passed in SQL within Templates.
Is there a way to pass the EAGUID within a custom query (template)? OR Scenario name with SQL? Or should I use a custom script to get the desired result?
I'm trying to access the EAGUID to filter per scenario in a way like the #OBJECTID# is being passed in SQL within Templates.
Code: [Select]
SELECT
a.step.value('@level', 'NVARCHAR(MAX)') AS 'step',
a.step.value('@name', 'NVARCHAR(MAX)') AS 'action',
a.step.value('@result', 'NVARCHAR(MAX)') as result,
a.step.value('@uses', 'NVARCHAR(MAX)') as comment
FROM
(SELECT CAST(XMLContent AS XML) AS Content FROM t_objectscenarios WHERE Object_ID = #OBJECTID# ???AND ea_guid = #EAGUID#???) s
CROSS APPLY Content.nodes('/path/step') a (step)
Is there a way to pass the EAGUID within a custom query (template)? OR Scenario name with SQL? Or should I use a custom script to get the desired result?