41
Views
3
Comments
List contains multiple Dropdown unable to put validation
Application Type
Traditional Web, Mobile, Reactive, Service
Service Studio Version
11.53.33 (Build 61790)

Hi! @Team
I'm building a form which contains a list and in that list I've put Dropdown which is bind to my static entity that shows four Subjects but I want to put a validation that If I select a subject Maths It won't show the Maths in next dropdown (We can say that those subjects which I've already selected in previous dropdowns won't show in current dropdown ) so, how will I achieve this please help me to complete the requirement.

I've attached the OML for your reference.
Thank you

TaskApp.oml
2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Ibad,

I suggest to have list of subjects into each record of your structure that you will assign to this list initially all subject lists into all records will have 4 subjects and you need to implement on change of dropdown list to remove selected item from subject lists of other records only 

UserImage.jpg
Ibad

Hello @Mostafa Othman,

Thanks for your quick response

I already tried to take a structure variable and check every-time all the selected records in dropdown but, unfortunately I'm unable to fulfill my requirement can you please share a Sample OML for my reference.

2022-08-03 04-32-50
Ravi Punjwani

Hi Ibad,

Please find attached OML file.

It is not a full solution yet, so take with a pinch of salt.

  1. You will find some modified references, because the module you shared didn't work initially without removing and fixing some references at my end.
  2. I've changed the way you were fetching the data on your screen StudentDetail.
  3. While I implemented most part of the solution, and the structural changes completely properly, I found the Add New record button wasn't there on the UI to add more subjects (in case there were none available from database), I have to stop at that point and share you the current state of solution.

You can incorporate these changes and see if it works for you. In the proposed module, you'll be able to add your own code to add and remove subjects in each dropdown widget. But surely, will need some changes which I couldn't complete due to no data available and no button to add new record on the list of subjects. Let me know once you have a newer version available to make further changes at my end. I'll be happy to finish those changes for you so you can see and understand the code of the solution I implemented.

Cheers!

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