darkhoros VIP
Total posts: 152
30 Jun 2016 15:22

Hi, I am developing a new project and trying to use relation to link diffrent types together, so here is my senario, I have multiple compaines, every company with multiple agents, but each agent must have only 1 company, and multiple products where eash agent has multiple products, but each product has only 1 agent.

So I created 1 section with 3 types, Companies, agents and products. For the Company type I created a parent field namd AGENT and later linked it to the child field named COMPANY in the agent type. For the AGENT field I had Limit children per one parent set to 10 so each company can have up to 10 agents.

For the COMPANY field I disabled the multiparent option so it is restricted to one parent per child.

Now testing things in front side, submitting new agent work as expexted, I have a drop down list with company names for me to select only 1 company, for the company submission on the other hand, it displys a multiselect box for me to select up to 10 Agents which is logical, but what is not logical is I can select an already assigned agent, meaning is lets say agent 1 is assigned to company a, now on submitting company b I should not find agent 1 on thee multiselect field as it is already assigned to company a, or gives error if I select and already assigned agent, where both never happend, I managed to get an agent assigned to 2 compaies, and even more on the agaent page full view under the company field I see 2 companies.

What is wrong with this setup, or is this a bug in the cobalt relation system.

A help is apreciated. Thank you.

Last Modified: 12 Jul 2016


darkhoros VIP
Total posts: 152
04 Jul 2016 20:53

Hi, I hope If some one can confirm this behavior or is it me doing somthing wrong with this field? If this is a bug is it going to be fixed? or not. Need an update Sergy, so I can think my solution, and figure out what to do. Thank you.


pepperstreet VIP
Total posts: 3,837
05 Jul 2016 00:05

Hello darkhoros, I am short on free time... but I am curious about your setup:
1 Section only? Do you use Categories to store the different types?
Which form/input template do you use for child/parent assignment? Did you try different input methods?


darkhoros VIP
Total posts: 152
05 Jul 2016 00:48

Hi, No, I dont use categories, it is only 1 section. I use default setup for form/input templates.

What do you mean by diffrent input methods?

Thank you for your kind reply.


pepperstreet VIP
Total posts: 3,837
05 Jul 2016 01:39

darkhoros What do you mean by diffrent input methods?

I am referring to "Form Control" parameters. You have different input styles for choosing children/parents.

cob_fields_relation_form_control_parents

cob_fields_relation_form_control_children


I am not sure about the 1 section storage... because you have 2 levels of relation.
Although there is a section parameter to hide "children", it could get "messy". Hence your 2 parents.

(If there is any free time, I am going to re-create your setup...)


darkhoros VIP
Total posts: 152
05 Jul 2016 01:44

Hi, I will try what you suggested, mean while you are more than welcome to access my development environment if you like to save your self some time. Tell me and I will send you access info. Thank you.


Sergey
Total posts: 13,748
05 Jul 2016 05:22

That was a bug. I have fixed that. And it will be available on next update.


darkhoros VIP
Total posts: 152
05 Jul 2016 11:18

Ok, Very nice to hear that, I will be watching out for next release then. Thank you.


darkhoros VIP
Total posts: 152
05 Jul 2016 22:35

So, Once the release is done I will need to reinstall all cobalt or just the relation field files?

I mean what should I watch for, a new coblat release or a field release? Thank you.


Sergey
Total posts: 13,748
12 Jul 2016 05:31

Нщг will have to update both Cobalt and relation fields.

Powered by Cobalt