cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetSelection code not working from c# .net code

Mounika
MEGA Partner
MEGA Partner

Hello ,

 

I am trying to use getselection in c# code but it's failing during runtime .

does any one have any idea how to use getselection method from c# code .

the sample query which i am using is 

oRoot.GetSelection["select [MetaClass] where [Creator]= ' " +userName + " ' "] ;

Could some one please help me on this.

The query is failing at runtime execution

5 Replies

Now ,
I got the issue .
I am using [creator] but i am passing [creator name] that might be the issue.
Thnx for your reply i will try it out as per your suggestion.

What value do you put in "creator" ?

 

In Hopex there are 2 fields :

creator : the absolute identifier

creator name : the label of the user

 

Have you tried your query within HOPEX first to see if it works ?

I am unable to navigate to the web link you have given .
It shows error saying i dont have privillages.
Thanks.

Hello,

Thanks for your reply.
Getselction is working fine when i run just by selecting.
Root.getselection("select [Application]" where [creator]);
But it fails only when i try to pass dynamically the creator name.

oguimard
Retired

Hello,

 

Have you succedded in running a more basic query like : "SELECT [Application]" ?

 

The getSelection need in some context 2 parameters :

* the query : SELECT [Application]

* the filter/sorter : "ShortName"

 

oRoot.GetSelection[query,filter];

 

Look at this post where someone had the problem https://community.mega.com/t5/Customization-Guru/API-JAVA-Generate-Website-Issue/m-p/20198