Skip to Content

export employee

Hi, I want to export all employees with admingroup. Step by step process please.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 05, 2017 at 09:49 AM

    Hi Ashish,

    The answer from will export all employees (just a small typo in his query, the character ' (single quote) needs to be removed.

    In case you wish to export all employees who belong to admingroup, then you need a couple of joins since the 'groups' is an attribute defined via a m:n relation.

     INSERT_UPDATE Employee;uid[unique=true];name;
     "#% impex.exportItems(""select {emp.PK} from {Employee as emp JOIN PrincipalGroupRelation as rel ON {emp.PK} = {rel.source} JOIN PrincipalGroup as pg ON {rel.target}={pg.PK}} WHERE {pg.uid}='admingroup'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1 );"
     
    

    Hope this helps

    Best

    Shanmugaraja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 05, 2017 at 09:13 AM

    4 simple steps:

    1. Go to admin console

    2. Create your flexible query, try it out on admin console > Console > FlexibleSearch

    3. Create export script

    4. Run export script admin console > Console > Impex Export

    Example export script:

     INSERT_UPDATE Employee;uid[unique=true];name;
     "#% impex.exportItems(""SELECT {pk} FROM {Employee}"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1 );"
    
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 06, 2017 at 05:03 AM

    Thank you very much Shanmugaraja

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.