68
Views
11
Comments
Unable to display the fetched data in the dropdowns
Application Type
Traditional Web
Service Studio Version
11.54.59 (Build 63275)

Hi everyone , 

today iam working on Employee Directory project ,i have created  3 dropdowns one for country, one for state, one for city. On selecting the country dropdown i need to get the respective states only, and also respective state cities.

this is working fine when i am creating new Employee ,but the dropdowns of state and cities are not showing when i click on the already existing data which is already created.

iam unable to fetch the data in the dropdown when i clicked on the respective id or name .



Screenshot (14).png
EmployeeDirectory.omllatest.oml
2024-04-26 12-21-07
Anjali_Dange

Hi @jayakrishnasai Korikana ,

You need to refresh the States aggregate in OnAfterFetch action of Employee aggregate to get existing state details. Please find attached oml for reference. 

Hope this helps.

Regards,

Anjali D.

EmployeeDirectory.omllatest.oml
UserImage.jpg
jayakrishnasai Korikana

Hi @Anjali_Dange thanks for replying but i have already  refresh the States aggregate in OnAfterFetch action of Employee aggregate 

2024-06-30 04-29-36
Priya Jhode

Hello, @jayakrishnasai Korikana 

I have created an oml , please check Detail Screen,

Hope this will help you,

Thanks ...


country_statewithentity.oml
2023-12-14 09-56-57
Yogesh Javir

Heello @jayakrishnasai Korikana ,
Seems like the oml dont have data in entity  of state and city.
rest code seems good to me.

Can you please verify wheather your state and city entity having data or not?

UserImage.jpg
jayakrishnasai Korikana

Hi @Yogesh Javir the dropdowns are working fine only when i refresh the page , i even opened in the incognito also but still i have to refresh this page again and again .


Screenshot (15).png
2023-12-14 09-56-57
Yogesh Javir

Hello @jayakrishnasai Korikana
At the time of retrival data you need to refresh state aggregate (GetStatesByCountryID) on after fetch of GetEmployeeById aggregate.
and you need to add filter like 

GetEmployeeById.List.Current.Employee.CountryId =NullIndentifier() or State.CountryID = GetEmployeeById.List.Current.Employee.CountryId

this will help you

UserImage.jpg
Lavanya A

hi jayakrishnasai Korikana,
           While Creating As @Yogesh Javir said, check your Database for State and City details there is no data.
         if Data available then i dint find any issues in your oml, you refreshed state and city with required filter in your code so there is no issue in oml.

      if you are saving all the data's but during retrieve there is an issue means, please debug and check the particular entity.

    if all country ,state and city mapped correctly then you will get correct output.


hope this helps you.

UserImage.jpg
jayakrishnasai Korikana

Hi @Lavanya-EONE thaks for the reply it is working fine but sometimes the data in the dropdowns was not displaying unless i refresh again especially for State dropdown .


Thank you


UserImage.jpg
Lavanya A


Your dropdown  was  correctly filtered. so, no issues in that  kindly check your entity details correctly, May it take time to load.

2024-06-08 15-17-54
Nawaz Khan

@Lavanya-EONE not sure why you need to stay on same page after successful employee record insertion. It will be better to redirect the user one dashboard page. 

Although you can fix the issue by passing the newly created/updated employee Id to the same page in saveOnClick event and it will resolve the issue. 

Find the attached Oml

Mark as as Solved please if it helped

EmployeeDirectory.omllatest.oml
2024-05-30 10-12-48
Anushka singh

hello @jayakrishnasai Korikana 

I hope it's help you

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