Dear All,
Let me describe my problem which I have with my subform.
As you can see from the image below I have two fields. The first is a lookup field (Excursion_Name) and the second is a dropdown (Optional_Rates1).
In the on user input of the lookup field I wrote the following:
- if (row.Excursion_Name == "Included Excursion Land & People")
- {
- row.Optional_Rates1:ui.add("Bus Transfer");
- row.Optional_Rates1:ui.add("Guide");
- }
With that it fills the Optional Rates field with two values.
Lets say that I choose 'Guide' and click Submit
If I want to Edit the record then in the On Edit -> On load I wrote again the following
- for each r in Subform
- {
- if (r.Excursion_Name == "Included Excursion Land & People")
- {
- r.Optional_Rates1:ui.add("Bus Transfer");
- r.Optional_Rates1:ui.add("Guide");
- }
This is because I want to choose another choice.
Then it shows me the following:
Of course in the dropdown it shows me the 2 choices Bus Transfer and Guide (like the 1st Image) but it fetches the record value (Guide in this example) in a Textbox.
Why this happens? Why it fetches the 'Guide' in a Textbox and not as a default value inside the dropdown menu?