Hello I am new to the platform and I need all the help possible to learn how to use the tool
I have two lookups “Countries” and “Cities” and I would like to filter the “Cities” according to the selected “Country”, how can I do this task?
I need to do this on the sales registration screen
my database model
== Country table ==
ID
Name
== City table ==
ID
Name
CountryID
== Sale table ==
ID
Date
CountryID
CityID
Ammount
etc...
I created an image to better explain the problem
I’m not using any visual assistant so I don’t know if this type of problem can be solved using the paid cuba studio assistants
They could help me solve this problem so that I can continue the evaluation of cuba studio, I have already looked at all the documentation and I have not found any example on how to solve this problem and I think this is something very simple to do
I am evaluating the cuba studio before making the purchase, what do I have to do to be able to have an answer here on the forum?
I activated the evaluation period and I already have access to the design screens but I still can’t find an option where I make a pickerField dependent on another pickerField in add/edit screen
I need cidadeField to be loaded according to the value selected in estadoField
When you want to use picker fields, you need to programmatically pass the selected value to the city browse screen in order to filter it in this datacontainer.
I had already seen this part of the documentation, I need to use pickerField because my city table has more than 30,000 records,
could you provide an example of how to perform this task via code?
so you mean 30,000 records per Country or 30,000 records overall?
Because if you only have 30,000 records overall in the table it is not a problem. The data load coordinator will only perform the query once you selected a value for the country. Then the result set will significantly less, right?
I couldn’t understand how to perform this task, would it be possible to create an example project?
This situation that I went through was very simplified, in reality the data model is just like that:
a “Country” has many “States”
a “State” have many “Cities”
a “City” has many “Neighborhoods”
a “Neighborhood” has many “Addresses”
records per table:
Country: 200
State: +5000
City: +100,000
Neighborhood: +1,200,000
I need to create a registration screen where I can filter all these levels until I reach the address
and I need to use PickerField for this task
Thank you very much now I fully understand the use of lookupField.
New questions have arisen related to the same subject I don’t know if I can ask right here or I have to open another forum post I am very grateful if you can answer these questions.
how to filter with accent insensitive in lookupField?
how is the performance / memory consumption of windows server environment that has 200 simultaneous users consulting a lookupField that always returns 6000 records?
how to leave the Enum result in UPPER CASE letters?
If you are talking about the concrete use-case of country / state / city lookup I would assume those values almost never change. Therefore you can introduce caching in some form or the other. Then you are not doing ongoing DB interactions. You can take a look here: Entity and Query Cache - CUBA Platform. Developer’s Manual