GetProjects List in DAX

static void GetProjects(Args _args)

{

ProjectListNode projectListNode;

treenodeIterator iterator,projectiterator;

TreeNode treenodeprivate, treenodeprivateprojects, treenodeShared,   treenodesharedprojects;

int i;

;

projectListNode = infolog.projectRootNode();

treenodeprivate = projectListNode.AOTfirstChild();

iterator =treenodeprivate.AOTiterator();

setprefix(“Private projects”);

for(i = 1; i<=treenodeprivate.AOTchildNodeCount();i++)

{

treenodeprivateprojects = iterator.next();

info(findproperty(treenodeprivateprojects.AOTgetProperties(),”Name”));

}

treenodeshared = infolog.projectRootNode().AOTfindChild(‘Shared’);

projectiterator = treenodeshared.AOTiterator();

setprefix(“Shared Projects”);

for(i=1; i<= treenodeshared.AOTchildNodeCount();i++)

{

treenodesharedprojects = projectiterator.next();

info(findproperty(treenodesharedprojects.AOTgetProperties(),”Name”));

}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: