How to assign a folder to particular user dynamically
Hi,
Could any one suggest me how to assign a folder to user dynamically depending on the value fetched from database..
Thanks in advance
Sundeep
Comments
-
You need to use a dynamic role. Define a new role and set the formula to whatever you need - so if you need a database value it is likely to be a select statement (Metastorm formula of course). Just beware that your formula needs to return a List of Metastorm user names.
Hope this helps.
0 -
Hi Paul,
As per your suggestion i have created Dynamic Role using the below formula.
SelectSql(
new RoleManagement_DBConnection(),"SELECT Manager FROM (select Manager , ROW_NUMBER()OVER(ORDER BY PortfolioManager DESC) AS RowNumber from Resources_Data where Resource_Status='Yes' group by Manager ) as t1 where t1.RowNumber=2;")
In the Formula Tab of the Role creation.
Above query fetches the one record which is name of the Manager. For Example consider 'sundeep' is fetched from that record.
I have already created a user with name 'sundeep'. Also for your information i am using flag from another process to create the task.
I was expecting that task which ever was created using flag will be visible to only sundeep.
Status: i am able to see 2 outputs after implementing this
I am able to see the case from all users
Though the case was created I am not able to see the case with any user.
could you please suggest where i am going wrong and also could you please tell me what should i do to enable dynamic roles in metastorm.
0 -
could you please tell me how should i enable the dynamic roles in metastorm ?
0 -
You must return a list from your SQL statement so you will need to use .List
Remember that ToDo and Watch list are calculated when a folder hits a stage so if your folder was already at a stage creating new or modifies roles will not add entries to these lists.
0 -
You do not need to enable dynamic roles.
0 -
Hi Paul,
Thanks for you quick reply.
Could you please provide more information on the details you have provided..
I did the following after seein your post :
It worked when i used ListItems function in the roles formula ,which is provided out of box by Metastorm and entered the user name in quotes.
But when i entered the sql statement to get the value dynamically from db using the select statement it is not taking that value.As per my knowledge , the select statement will return the data in the form of list, if not could you please let me know how can i get the data from db in the LIST form.
appreciate if you can provide an example for getting the data in list form using any simple select query.
Added the screen shots of both the scenarios discussed above.
Thanks in Advance.
0 -
try this.... SelectSql(new myConnection(),mySQLStatement).List
0 -
Thanks Paul,,
It worked.
0 -
Hi does anyone have an example of the code used on a dynamic role that is based on a value of a custom variable
I have an action that i only want visible if a specific checkbox is ticked, so if chkRequired = TRUE
In V7 we used %Evaluate and I realise that there is a %Evaluate in V9 but i dont want to use it as its not the best way to do it.
I have tried
If(TAPData.chkRequired==true, GetToDoList("ProcessContext.FolderId"), "")
But this fails
If someone has any examples, i would really appreciate if you could post them.
Thank you
0 -
Mel wrote:
If(TAPData.chkRequired==true, GetToDoList("ProcessContext.FolderId"), "")
I haven't tried something along these lines, at least not yet. However, I don't believe ProcessContext.FolderID should be in quotes as that will be interpreted as a literal instead of passing in a folder ID. (At least from things I've tried thus far.)
0 -
In latest v9 you have property only show action if. You may use it instead of creating roles to hide actions.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories