Answered

Identify the user area executing the application query in the report search filters

Hello everyone.

In the company I work for. I am looking to create a report that users in each area of ​​the company can only see information related to that area. And company users are categorized by region. But the problem that is installed in Bizaji is that the company is currently writing 11.2.4.0295. That is, there is no function in the application query report or table query that does not give the executable user attribute. Or for example:

Me.Case.WorkingCredential.UserId Or Me.Case.WorkingCredential.AreaName Or Me.Case.Creator.Id

They are not useful at all .because the me function works based on process and case, but in the report form we do not have a process-dependent user to get the information, and the filters of the creator user and the current user are not suitable for this report. I need a function and command that reports in the area filter and in the default value field and returns the area value of the user performing the report and causes the filter to be displayed in the same user related area. Has this function been added in the new version of Bizaji. Because I searched for the program's online guide. I did not find the function that is not process dependent but specific to reports. please guide me .

Thank you iman

Comments (5)

photo
2

Dear Iman,

Thank you for letting us know your questions. The reason why it does not work the way you explained it is because you need to use Credential instead of Me.WorkingCredential when working with queries (which is what you need to do to filter the information by area). For more information on this topic, feel free to refere to the following article:

https://help.bizagi.com/bpm-suite/en/index.html?manage_the_user_allocated_to_the_current_task.htm

Kind regards,

Laura G

photo
1

Thank you . Mr. Garcia. The article you submitted was helpful and outlined a variety of user authentication methods. But I also found that referring to the Credential method could be done alone and without using the Me.Working prefix. He also stated that this grammatical form is used for summary forms and reports. However, the example given is for the summary form, which is displayed in the information display section of the form based on its specific role and requires receiving the role input parameter. But about the report. I am embedding my code with the area section and in the advanced properties section of this field with the default value property, which in the event of calling the report form of this section must execute the required method without receiving the input parameter and return a return value like the same area. I need the user area data or its ID in the Wfuser table or any unique user attribute to find its specifications, which in the end automatically changes the value of the area according to the user running the query form. And I also tried this command without giving an input parameter. But I got an error when I took a photo of the error for you and it is attached to this message. Please check back later and check for errors. But in any case, it has not been practical for this need so far. But I tried to research the Credential method alone and find a guide with more examples to use. But I have not found anything on the Bizaji guide site or anywhere else. However, from your attention and help to me. Thank you very much and I still need more guidance to find the method without getting the input parameter.

Thank you iman

photo
1

Thanks to Ms. LAURA GARCIA

photo
2

Dear Iman,

Apologies for the delay in answering your follow up question.

From your description, we understand that you are trying to get the Area id from the user; this is not possible. As you might have already seen, it is only possible to request the area name (areaName), not the id.

An alternative might be to go through all the areas in your data model and compare the name of each of them with the name of the area associated with the user.

The following article shows a similar scenario to go over a collection to obtain particular information and operate on it: https://help.bizagi.com/bpm-suite/en/index.html?get_user_properties.htm#userproperties (at the end there is a series of expressions including "Me.getXPath("entity-list('WFUSER','idBossUser = @BossUser')",parameters);" which is the one you should use, although using Area instead of WFUser and changing the attribute you are comparing)

This way you would be able to obtain the corresponding ID of the areaName of a user.

We hope this helps.

Kind regards,

Laura G

photo
1

Thanks to Ms. LAURA GARCIA

photo