‎05-12-2018 11:54 AM
Hi.
Query name is EA_LISPA_SB_DIREZIONE_LISPA_BS
Query code is
Select [Attore]
Where ([Composto].[Nome] Deeply = "97_Organizzazione LISPA::LISPA" And [Tipo-Attore] ="S") And
[Owns And Governs]:[Business Service] = &"bs"
VBA macro
Const maCodiceQuery1 = "~ZIXaICfyheJ0[_Select]"
Const IDQueryStrutture = "~SHdazOw1SjPT[EA_LISPA_SB_DIREZIONE_LISPA_BS] "
Const maNomeBreve1 = "~Z20000000D60[Nome breve] "
Set oQueryStruttureLispa = oRoot.GetObjectFromID(IDQueryStrutture)
Set oAttoreStrutturaLispa = oRoot.GetSelection(oQueryStruttureLispa.GetProp(maCodiceQuery1))
Question is
How can I pass the &"bs" query parameter in VBA?
Thanks
Marco
‎10-12-2018 04:26 AM
Well if your heart is set on Mega Defined queries, I know there could be a better way but following might help:
set q = (getRoot.getSelection("select query")("~weXNBzL3Sj4P[orgprocess]"))
qs = q.getProp("~ZIXaICfyheJ0[Select]")
set p = q.getCollection("~fr2tZ3UHxq10[Parameter]")(1)
vname = p.shortname
vid = p.getProp("_idabs")
rep = "&~"& vid &"{V}[""" & vname & """]"
print REPLACE("""" & qs & """",rep,"""test""")
‎07-12-2018 11:50 AM
You can write Dynamic query
Ex " Select [Business Process] Where [_HexaIdAbs]='"&VariableObject.GetProp("_HexaIdAbs")&"' "