Retrieve Group membership: Difference between revisions

From SMTX Wiki
Jump to navigation Jump to search
Created page with "If you want to know in a form, to which groups a user belongs,use this Query in a webservice: SELECT [Name] FROM [PersonGroup] WHERE [Id] IN (SELECT [PersonGroupId] FROM [PersonGroupPerson] WHERE [PersonId] IN (SELECT [Id] FROM [Person] WHERE [Email] = #EMAIL#)) AND [Name] IN ( '03. Anesthesiology (PD)', '04. Biobank (PD)', '05. Cardiologie (PD - OD)', '06. DPO (PD)', '07. Gastro-enterology (PD)', '08. Information management (PD)', '09. Laboratory (PD)', '10. Legal depa..."
 
No edit summary
 
Line 23: Line 23:
This will return the group names form the groups listed.
This will return the group names form the groups listed.


dample form :
Sample form: https://dev.ssp7.smt-x.com/Forms/Admin/formDetail.aspx
Webservice: https://dev.ssp7.smt-x.com/Common/Admin/WsCallAddEdit.aspx?genericid=403

Latest revision as of 14:11, 20 February 2024

If you want to know in a form, to which groups a user belongs,use this Query in a webservice:

SELECT [Name] FROM [PersonGroup] WHERE [Id] IN (SELECT [PersonGroupId] FROM [PersonGroupPerson] WHERE [PersonId] IN (SELECT [Id] FROM [Person] WHERE [Email] = #EMAIL#)) AND [Name] IN ( '03. Anesthesiology (PD)', '04. Biobank (PD)', '05. Cardiologie (PD - OD)', '06. DPO (PD)', '07. Gastro-enterology (PD)', '08. Information management (PD)', '09. Laboratory (PD)', '10. Legal department (PD)', '11. Neurology (PD)', '12. Nuclear medicine (PD)', '13. Pathology (PD)', '14. Pharmacy (PD)', '15. Radiology (PD)', '16. HR department' )


This will return the group names form the groups listed.

Sample form: https://dev.ssp7.smt-x.com/Forms/Admin/formDetail.aspx Webservice: https://dev.ssp7.smt-x.com/Common/Admin/WsCallAddEdit.aspx?genericid=403