Page 1 of 1

Identifying existing picklists

Posted: Thu Jun 26, 2014 1:20 pm
by deepakjain2020
Hi All,

In already existing system, i need to identify what picklists are defined.
can someone please help me in knowing how to find out existing picklists apart from manually?

Regards,
Deepak Jain

Re: Identifying existing picklists

Posted: Thu Jun 26, 2014 1:25 pm
by jim wood
Obviously you can do a scan of the data directory for picklist cubes. Also you'll need to do a flush through all element attribute cubes for any picklists set up that way. That's not that diffcult to do as all attribute cubes have 2 dimensions. If you build a process to scan the data directory for picklist or attribute cubes, youcould pass the attribute cube names to a subprocess. The is theotical, and while possible this is a ot of effort when you can jst have a look,

Jim.

Edit: Silly me, you could use the }Cubes dimension, rather than scanning through the data directory.

Re: Identifying existing picklists

Posted: Sat Jun 28, 2014 4:32 pm
by java_to_tm1
jim wood wrote:The is theotical, and while possible this is a ot of effort when you can jst have a look,
The worth lies in having to pull out this information from a server that has 300+ dimensions.

DJ,
The below TI code will TextOutput a list of Dimension, their measure elements and the specific picklist used in that element:
Please note: this will not get you stuff from the picklist cube: this works only on the attributes cube. The Ti process for the picklist cube is a little bit trickier but it is still do-able...

Note
1. my naming convention leaves a lot to be desired.
2. The seond scan (for }ElementAttributes_}...) is to prevent getting picklists used in the attributes for control dimensions. If you DO want these listed out as well, you can comment out the second scan .

Code: Select all

dim = '}Dimensions' ;
size = DIMSIZ ( dim );

tgtfile = 'E:\DEBUG\dimList.txt' ;

TextOutput ( tgtFile , 'Dimension' , 'Element' , 'Picklist' );
idx = 0 ;
while (idx < size ) ;
	idx = idx + 1;
	dimEl = DIMNM ( dim , idx );
	IF ( SCAN (  '}ElementAttributes_' , dimEl ) = 1 & SCAN (  '}ElementAttributes_}' , dimEl ) = 0 );
		IF ( DIMIX ( dimEl , 'Picklist' ) >0 );
			dimWithPicklist = SUBST ( dimEl , 20, LONG(dimEl) - 19 ) ;
			elementIdx = 0;
			msrSize = DIMSIZ ( dimWithPicklist ) ;
			WHILE ( elementIdx < msrSize );
				elementIdx = elementIdx + 1 ;
				measureElement = DIMNM ( dimWithPicklist , elementIdx ) ;
				IF ( CellGetS ( dimEl , measureElement , 'Picklist' ) @<> '' );
					TextOutput ( tgtFile , dimWithPicklist , measureElement , CellGetS ( dimEl , measureElement , 'Picklist' ) );
				ENDIF;
			END;
		ENDIF;
	ENDIF;
END;