This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

WebDesigner - Dynamically create properties

Hello Experts,

7.1.1

Apologies for hammering WD questions on the forum - all help is much appreciated! :)

 

Is it possible to dynamically add properties in a collection?

Basically I need to display a bunch of combobox type properties but I don't know in advance how many of those will be there. Effectively I need to create a property to store each selection in the combobox. I tried using the same property for all but then it messed up the selected values in the display when the user selects another property.

As an example, the form might be like this:

Q) Server Required? (dropdown: S01, S02, S03)

Q) DB Required? (dropdown: D01,D02,D03)

Q) Access Required (dropdown: Read,Write)

For now, I have a single-row collection "SelectedVal". I tied this to the combobox for all the boxes. The comboxes are shown in a grid iteration (with a save button after each option), so when the user clicks save I can save the selected value to a different collection, however sharing the common "SelectedVal" collection messes up the display when the user selects different value in the dropdowns.

Any suggestions?

Thanks

Kin

Parents
  • I think I can phrase this one a bit better

    I have a collection (Vars), and I have multiple columns inside it (Val1,Val2,Val3,Val4....Val10)
    Now, I'm iterating over a different collection (Iterator). Within it, I call a Combobox and give it a list of values to be shown. What I want is that the first time the combbox is invoked, the value is tored in Val1, next time in Val2, after that in Val3 etc.

    Something like:

    i = 0
    For Each (elem in Iterator)
    Vars.Column("Val" + i) = <selected value from combobox>
    i++
    Next
Reply
  • I think I can phrase this one a bit better

    I have a collection (Vars), and I have multiple columns inside it (Val1,Val2,Val3,Val4....Val10)
    Now, I'm iterating over a different collection (Iterator). Within it, I call a Combobox and give it a list of values to be shown. What I want is that the first time the combbox is invoked, the value is tored in Val1, next time in Val2, after that in Val3 etc.

    Something like:

    i = 0
    For Each (elem in Iterator)
    Vars.Column("Val" + i) = <selected value from combobox>
    i++
    Next
Children
No Data