For info, here is a script that works in my environment. I only use PAW editor (ver 2.0.41) no Architect anymore.
sDim = 'ActuarialSegment:CalculationSegment';
sMDX = '[' | sDim | ']';
sMDX = '{TM1SUBSETALL( ' | sMDX | ' )}';
sMDX = '{TM1FILTERBYLEVEL( ' | sMDX | ', 1)}';
If (SubsetExists(sDim, cSubset) = 0);
SubsetCreatebyMDX(cSubset, sMDX);
Else;
SubsetMDXSet(sDim, cSubset, sMDX);
Endif;
------------------------------
Trevor Mills
------------------------------
Original Message:
Sent: Sun June 09, 2019 09:34 AM
From: Anssi Lehtinen
Subject: Default set for hierarchy (PAW)
Thanks for the reply, Trevor
Unfortunately I'm unable to get that to work. I tried
SubsetCreatebyMDX('Customer:Customer By Country', vMDX);
and got Error: Prolog procedure line (6): Name ('Customer:Customer By Country') contains an invalid character (the invalid character being the colon, since if I remove that, I can create subsets, but obviously they do not become the default subset). Customer is my dimension and Customer By Country is the hierarchy I want the subset in.
Ran the code in the TI editor in PAW and will not fire up Architect until July when my vacation is over so will get back to this then.
Cheers, Anssi
------------------------------
Anssi Lehtinen
------------------------------
Original Message:
Sent: Thu June 06, 2019 08:19 AM
From: Trevor Mills
Subject: Default set for hierarchy (PAW)
Hi Anssi,
I create default subsets in hierarchies with a TI. E.g. SubsetCreatebyMDX('DimensionName:HierarchyName', sMDX);
regards
Trevor
------------------------------
Trevor Mills