Hope you are all doing great. I have been digging around about setting up data Source dynamically. Use case:
I have 4 lists - the lists have the same structure - column: Title (text), Description (Multiline text) and FolderName (text).
Then I have different list (let's call it "parent" list). On this parent list I create a Plumsail form. The plumsail form has "Lookup control and I would appreciate your help I can dynamically with Javascript to set Data Source dynamically. "ListURL" is enough for me.
Developer console when selecting the control - properties:
A list with different areas, A, B, C, D is just a control list. For each area, there is another list that holds records of specific data. Let's say there is a control list ‘Areas’ and it has an ‘A’ record in it. If I do a ‘lookup control’ on the parent form to this list, I will see ‘A, B, C, D’ in the dropdown.
When I select ‘A’, I want the next lookup control to dynamically set the source data from the ‘AreaA’ list. If I select the value ‘B’, I want the next lookup control to set the data from the list ‘AreaB.’
I hope I've explained this decently.
Maybe I'm going about it systematically wrong and should do it differently
Changing the source is not a good idea. Not only will the link in the list view take users to wrong items, but it will also certainly lead to data errors.
Your options are:
Cascading drop-downs. You will need to change the source data structure. This is the best option in my opinion.
Creating several controls and showing/hiding them.