Arc AttrPutS auto-complete (intellisense); OK, what am I missing here?

I just hit the attrs autocomplete statement in Arc, and this came up:
AttrPutS(‘Value’, ‘DimName’, ‘ElName’, ‘AttrName’, ‘[LangLocaleCode]’, [UniqueFlag])

Sooo… I know what all of the first 5 arguments are… but [UniqueFlag] does not register. I thought it may have been something that IBM snuck through recently, but it does not appear anywhere in the IBM documentation, whether printed or live. Nor can I find a reference to a “UniqueFlag” in a general web search for “TM1” and “Arc”. Where did you get this from, please?

Hi @AlanKirk,

That argument was added as an undocumented argument at the request of a Cubewiser. I will follow up to see if it can be confirmed.

I noticed this argument in a TI process done by an Applix presales guy waaay back when. I asked about it and they confirmed this was an optional Boolean flag (with default value =false) to enforce uniqueness when loading alias values. If the string being loaded as an alias isn’t unique then the principal name is concatenated as a suffix to the string. Apparently it has been there since the birth of TI.

I can no longer remember exactly when this was or who the Applix guy was but I have used this ever since. It has never been documented, but this is not of itself unusual (Sleep, Break, SwapAliasWithPrincipalName, the 3rd “dimName” argument in SubsetCreateByMDX, CubeLockOverride also working for element locks also come to mind).

It is pretty easy to confirm that it is a valid argument.

  1. the code compiles
  2. it works!

It’s a good shortcut and is included in bedrock processes and our internal frameworks.

In terms of the ordering if also using localized attributes I’m not sure if it would come before or after the locale code but I presume after as the last argument.

(I never tried using this flag on a AttrPutS for a string attribute, not sure what it would do in that situation).

1 Like

Is anyone else experiencing an issue in PAL 2.0.9.11 with the unique flag not working? I have never had an issue with it but now it keeps ignoring the fact the flag is set in the AttrPutS.