Yetiforcecrm: Too many picklist values cause yetiforce to freeze

Created on 12 Jan 2017  Â·  11Comments  Â·  Source: YetiForceCompany/YetiForceCRM

Issue

Yetiforce hangs if there are too many picklist values in a field.

Actual Behavior

I have added 2 custom address fields in my system: State and Suburb which I want to have set values. I have 5 States and in Suburbs I have 16013 places. I couldn't add these individually when creating the picklists, so I imported a large proportion of them directly into the database table. The records imported ok, but I am wondering if this is a bad way to do it, and whether it effects performance? I wanted to build the relationships so when a state is selected, it shows only the suburbs for that state. So I went to Fields - Picklists/Relationships, it works fine until I get to selecting the source fields, then it hangs for ages, eventually returning the next page with the values. However, the system really slows down (Is this because there are too many records in my suburbs table? is there a fixed upper limit for the number of records allowed in a picklist? In addition, there doesn't appear to be an ability to scroll right to view/select the additional source fields.

I have since deleted all my custom fields and about to start again, but thought I would ask the question as to whether yetiforce can deal with so many rows in picklists/relationships fields? If it can, is there a best practice for doing something like this?

  • YetiForce Version used: 3.4.0 with hotfix

Regards

âť” question

All 11 comments

Create new module and import the values, then add 1:M field relation.

Hi @PercyP , what type are your picklist fields [with or without permissions – you can check it by telling us what uitype these fields are]

@paula-w

Both uitypes are 16 is that correct?

I created them as Picklist from the drop down when creating the fields.

@nic86 How do you import them as there doesn't appear to be an import button on the custom field creator? DO you do this somewhere else?

  • Create new module with name 'your custom name' and field 'Suburbs'
  • add to the new module a field picklist with name 'state' and add your 5 values
  • create a csv file with states and suburbs column (so you have a file with 16013 row)
  • split the csv in 500 row or change the limit of max values import in config/config.inc.php
  • add the new module to menu
  • open the new module,then import the value form the button 'import'
  • relate the new module to every other module
  • the field 1:M relation lets you search by state and Suburbs

@nic86

I would never have thought of doing it that way - thank you! I will go try it out now. It makes perfect sense!

Unfortunately a regular picklist field is not optimized [some time ago we optimized the “Assigned to” and “Share with” fields, their settings can now be switched between two modes, in the first one you always see everything, and in the second one you have to start typing to see the suggestions].

16k elements is quite many, then you have to resort to some “tricks”. Using a new module is a good idea, but it also has some drawbacks.

@nic86

Thank you for your suggestion. I have played around with it all day but cannot get it to work well for me. I followed your brilliant steps, then created two 1:m fields in my regular module where i want the address fields to appear, calling one State and the Other Suburb to match the new module fields I created.

When I try to add a record, it shows popup for the new Locations module and I can select both values from the dropdowns, however they act in isolation of each other (they don't act like picklist) in the browse window I just see every state repeated with the individual suburbs next to it. It isn't the most user friendly way of achieving this.

There must be a way of building picklists to handle this situation better - without the entire system crashing as it is now.

If not, then is there a better way of adding addresses i.e. I see there is a google component in yetiforce.

It might work in the next stable version (3.5) that will be released. In the next stable version, from the field 1: M, is possible search for more fields.

Now, the only thing you can do, is to open a separate browser tab with the new module and make a search

then created two 1:m fields in my regular module where i want the address fields to appear, calling one State and the Other Suburb to match the new module fields I created.

you need only one field 1: M, the value of the field already contains the relation for both values: ​​state and suburb

I'm trying to understand why are you making things more complicated all the time. If a picklist loads to slowly, the mechanism should be optimized! The same applies to the panel for managing relations. So you should focus on how to improve the system, not on how to omit problems because such an approach doesn't make the system better.

@bpabiszczak

I'm trying to understand why are you making things more complicated all the time. If a picklist loads to slowly, the mechanism should be optimized!

it is 100% because I am learning here - like many others. I assumed a picklist would be the right tool to achieve what I wanted to do as i have the exact same setup on my Joomla website - a component that has states and suburbs in 2 picklists which are located in a MySQL database, so I didn't question at all that it would be any different within the crm given that it too is using a MySQL database. So I don't yet know what is required to optimize it.

@nic86

you need only one field 1: M, the value of the field already contains the relation for both values: ​​state and suburb

Aha! I see where you are coming from now. Many thanks for explaining further

@bpabiszczak

I'm trying to understand why are you making things more complicated all the time. If a picklist loads to slowly, the mechanism should be optimized! The same applies to the panel for managing relations. So you should focus on how to improve the system, not on how to omit problems because such an approach doesn't make the system better.

I agree with you, the solution is just a trick, the problem should be solved at the source.

Was this page helpful?
0 / 5 - 0 ratings