18
Views
6
Comments
Solved
one to many relationship no output
Question

Hi guys, 

At the moment I am trying something what actually might be pretty simple. 

I created two entitys 

Categories and Equipment 

The equipment has the categoryId to have a connection.So one category can have one or more equipments. 

after creating the category detail screen and drag and drop the equipment entity to it the systems creates a popup with the posibility to add one or more equipments to a category. 

I changed the input field to a combo box to select equipments I created before and add them. 

If I am now trying the process. It doesn´t add the equipments to the list but adds blank fields into the category detail and also into the equiment list. 

I guess the issue is with the combo box but I have no clue what I have to change


Thanks for your input!

Tobi


2019-01-23 15_48_49.png
2021-03-05 13-56-11
Ricardo Pereira
 
MVP
Solution

Hi,

What I thing you need it's a many to many relationship. you need to create a table to associate equipment and Category.

An example with other labels:


After that, you can drag and drop that table in the Category detail screen.


Hope this can help.

Regards,

Ricardo

2018-06-15 00-21-10
Pedro Vila Nova

BigSlikTobi wrote:

Hi guys, 

At the moment I am trying something what actually might be pretty simple. 

I created two entitys 

Categories and Equipment 

The equipment has the categoryId to have a connection.So one category can have one or more equipments. 

after creating the category detail screen and drag and drop the equipment entity to it the systems creates a popup with the posibility to add one or more equipments to a category. 

I changed the input field to a combo box to select equipments I created before and add them. 

If I am now trying the process. It doesn´t add the equipments to the list but adds blank fields into the category detail and also into the equiment list. 

I guess the issue is with the combo box but I have no clue what I have to change


Thanks for your input!

Tobi

You create a combo box with the Categories? And place the source entity : Category? and save the id in a var to make an assign on form?


Best regards


2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Hi,

Can you share with us prints of your logic/actions? It's better to understand what you are doing and what can be wrong.

Thanks!


Regards,

Ricardo

UserImage.jpg
BigSlikTobi

I guess the problem is, that with the popup created automatically I can create new equipment. But I want to add equipment already created to a category.

the logic is the logic created by the system


2021-03-05 13-56-11
Ricardo Pereira
 
MVP
Solution

Hi,

What I thing you need it's a many to many relationship. you need to create a table to associate equipment and Category.

An example with other labels:


After that, you can drag and drop that table in the Category detail screen.


Hope this can help.

Regards,

Ricardo

UserImage.jpg
BigSlikTobi

This seems to work! 

Thank you!!! 

2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Glad to ear that!


You're welcome! ;)


Regards,

Ricardo

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