cancel
Showing results for 
Search instead for 
Did you mean: 

Filter RegionCode field by country

marlosdamasceno
Participant
0 Kudos

Hi there,

I am trying to filter by country a field of type: RegionCode. Therefore, my combo box it will show only the states of the respective country.

Right now, it is coming all countries states. Leaving the combo box really slow. I am using the Studio and the screen is a custom OWL.

How can I achieve it?

Here some prints to illustrate better.


Data Type:


How is the current situation:


What I would like to do (filtering by Brazil BR):


Thanks in advance.


Best regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create the element and then in the UI DataModel create a new Data Field called Country and set the initial value to the CountryCode (e.g. BR).

Then right click on the Region element and click Codelist Context Mapping, tick the box next to CountryCode and then click the button at the end of the row. Then select the data field called Country.

It should now work like below

Thanks,

Will

marlosdamasceno
Participant
0 Kudos

Hi Will,

Your solution works pretty fine! Thank you!


However, getting hard it is possible to do the same thing without creating the element Country in the BO?

I tried using a string field only in the UI, as a parameter to the region code field, but it crash when opening the dropdownbox. It must have to be a field bounded with the BO?

Att

former_member200567
Active Contributor
0 Kudos

Hi Marlos,

->However, getting hard it is possible to do the same thing without creating the element Country in the BO?

Yes. Will's reply already contain how to do it. And it should work.

Best Regards,

Fred

Answers (1)

Answers (1)

Former Member
0 Kudos

Check step C


Create a context mapping between the ...

Do you have field for Country or do you simply want to filter always by the same country?

Use the right-click option on data model field, as mentioned in the link above, and select the data type column to be filtered, and then the data field.

If you want to always filter by the same Country, define an unbound data field with the value hard coded in there.

Hope this helps.

marlosdamasceno
Participant
0 Kudos

Hi Fernando, thanks for your reply

Yes, I always want to filter by the same Country. I could create a code list with the states and use it in my BO. However, I am already using this field in another thing (i.e. web services) and is not possible to change it.

What exactly do you mean with “unbound data field”? Is it a custom code list?

Best regards