Internal Error is shown when I use If condition in Add Group Filter
Application Type
Traditional Web
Service Studio Version
11.50.9 (Build 46307)

Internal Error is shown when I use the If condition in Add Group Filter

  • When I click on the check box, all the 0's in the count should be on display.
  • But When I use this Condition in Group filter(If(Ischeck=True,Count=0,Count>0)) , I'm getting an internal error.

Regards,

Mohamed  Zubair Ahmed

groupfilter.png

mvp_badge
MVP
Solution

Hello there Mohamed,

The correct error in Service Center will certainly help us to understand what the problem is.

However, you should start by looking into your aggregate:


You are comparing 2 identifiers in your join with different data types, which is not correct. That happens because you're comparing an User Identifier (UserId) with a PersonId, but that PersonId is a PersonRole Identifier:

Reviewing this in the Aggregate (and probably the datamodel) should be the first step in order to fix your issue.


Suggestions:

1) I'm assuming that your entity Person should have a PersonRole Identifier, so you can specificy if a Person is a Director, Producer, Actor or Crew. So call it by the correct name. Do not call PersonId to that attribute, since it may be confusing. Call it PersonRoleId, since it is a PersonRole Identifier.

2) Also related with the roles topic, I don't think you should store those roles in a Static Entity. Are these application roles? If they are, you can (and should) use System Roles, instead of creating your own Role mechanism.

You may use these roles to check if a user can click a button or do a specific action in your application (using Check<Role>Role Action) or to control which roles have access to a certain screen. As an example:


Also you can grant these roles directly to the users, for example, using Users application.

Check more information here: https://success.outsystems.com/Documentation/11/Developing_an_Application/Secure_the_Application/User_Roles

3) Is your Person entity an extension of an User? Like, for each User, it only exists one record in the Person entity. If so, this relation should be 1-to-1. This means that the Id attribute of your Person entity should be an User Identifier and this will be the one that you should use in your join within the Aggregate.

For more information about this topic, check here:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Create_a_One-to-One_Relationship


Hope that this helps you!


Kind regards,

Rui Barradas

Hello Mohamed, can you share your OML if possible?

Kind regards,

Márcio

Hi Marcio, 

  I have shared the OML below.

Regards ,


Zubair

OSMDB.oml

Hi Mohamed, 

can you check the error on Service Center and post it here?

Thanks

Hi Jose,

 There is 403 forbidden error in service center , I have attached the image below.

Regards,

Zubair

Errorlogforaddgroupfilter.png

mvp_badge
MVP

Hello Mohamed,

Hope you're doing well.

As I can see in the image, that error is not related with the "Internal Error" that you mentioned above.

You have to filter for your module in Service Center, which is OSMDB in your case. If you check the image, the module of that error is LifeTimeEngine, which is a different module.


Kind regards,

Rui Barradas

mvp_badge
MVP
Solution

Hello there Mohamed,

The correct error in Service Center will certainly help us to understand what the problem is.

However, you should start by looking into your aggregate:


You are comparing 2 identifiers in your join with different data types, which is not correct. That happens because you're comparing an User Identifier (UserId) with a PersonId, but that PersonId is a PersonRole Identifier:

Reviewing this in the Aggregate (and probably the datamodel) should be the first step in order to fix your issue.


Suggestions:

1) I'm assuming that your entity Person should have a PersonRole Identifier, so you can specificy if a Person is a Director, Producer, Actor or Crew. So call it by the correct name. Do not call PersonId to that attribute, since it may be confusing. Call it PersonRoleId, since it is a PersonRole Identifier.

2) Also related with the roles topic, I don't think you should store those roles in a Static Entity. Are these application roles? If they are, you can (and should) use System Roles, instead of creating your own Role mechanism.

You may use these roles to check if a user can click a button or do a specific action in your application (using Check<Role>Role Action) or to control which roles have access to a certain screen. As an example:


Also you can grant these roles directly to the users, for example, using Users application.

Check more information here: https://success.outsystems.com/Documentation/11/Developing_an_Application/Secure_the_Application/User_Roles

3) Is your Person entity an extension of an User? Like, for each User, it only exists one record in the Person entity. If so, this relation should be 1-to-1. This means that the Id attribute of your Person entity should be an User Identifier and this will be the one that you should use in your join within the Aggregate.

For more information about this topic, check here:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Create_a_One-to-One_Relationship


Hope that this helps you!


Kind regards,

Rui Barradas

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.