Hello,


Im working on a project with 2 entitys that are using Id Data from each other. The Project.Entity uses the User.Id . The Character.Entity uses the User.Id and the Project.Id

What i am trying to accomplice is that every Project.Entity(You can make Multiple)  has his own Id and when clicked on it, you can make mutiple Character.Entity that are unique to that Project.Enitity. So they will not show up by any other Project.Entity.

What I have now is that creating a Project.Entity with the use of a User.Id is possible. But when I am creating a Character.Entity it will not exclusively be for that Project.Entity. 


Please help!

Hi,

Basically you don't want to have duplicate Character for a project. You can accomplish this in two ways

  1. Have logic on the screen action to check for duplicate, if found as duplicate then end the action.
  2. Have an composite index on the Character entity with unique so that any duplicate insert file for example of Name and Project Id together has to be unique then create a index with these two columns and mark it as unique.

Regards.

Prasad Rao wrote:

Hi,

Basically you don't want to have duplicate Character for a project. You can accomplish this in two ways

  1. Have logic on the screen action to check for duplicate, if found as duplicate then end the action.
  2. Have an composite index on the Character entity with unique so that any duplicate insert file for example of Name and Project Id together has to be unique then create a index with these two columns and mark it as unique.

Regards.

Thank you for the reply!

I already got the part that estabalised what the id will be. the part I am struggeling with is how to get the information of an saved character seen on the screen. 

for more reference I linked the project i am working on.


Regards


Hi,

I think you are missing the filter. see the screenshot below

Regards.

hey,

i put the filter in place but the characters are still visible in all projects. he doesnt seem te mind the Project.Id

Solution

Hi,

I found the mistake, you are not passing the project id to Characters page correctly, that is the reason why filter is not working. 

In Projects page on the list click you are passing GetProjectsByUserId.List.Current.Character.ProjectId when I first created the project there are no characters hence this will null, once I changed this to GetProjectsByUserId.List.Current.Project.Id, now I can see characters for that project. and in projects page I do not think you need to join on character table.

Regards.




Solution

Prasad Rao wrote:

Hi,

I found the mistake, you are not passing the project id to Characters page correctly, that is the reason why filter is not working. 

In Projects page on the list click you are passing GetProjectsByUserId.List.Current.Character.ProjectId when I first created the project there are no characters hence this will null, once I changed this to GetProjectsByUserId.List.Current.Project.Id, now I can see characters for that project. and in projects page I do not think you need to join on character table.

Regards.




Thank you! that was exact the problem thank you so much