Dynamically set Data Source - Lookup control

Hello guys :slight_smile:

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:

I tried to change "__listUrl" and then:

fd.control("lookupInternalName").refresh();
  • But this approach did not work :slight_smile:

Thank you so much
Stepan

Hello @StepanS,

Why do you need to change the source? Could you please describe the use case.

Hello @Margo ,

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 :slight_smile:

Thank you

Stepan

@StepanS,

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:

Hello @Margo ,

you are correct. I will think about different approach.

Thank you :slight_smile:

1 Like