Focal Point
[SOLVED] Setting value of chained HTML control

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5897029096

November 16, 2018, 02:30 PM
capples
[SOLVED] Setting value of chained HTML control
I'm working on building a self-service type tool within the HTML composer that will pull an array from a populated control on my HTML page, and set the selection of another control based on this selected array.

I'm able to get this to work for every control except for one that is chained. The chained control is a sub-task field of a parent task field. When the task field is updated, the sub-task control list is then updated as well. Even if I wait for the chained control to be updated and try to use javascript to make the selection at this time, it still does not work.

I've been using the built in IbComposer_setCurrentSelection('control',array, true) ; function which works for everything else except for this one chained control. I've tried switching between true and false both on the chained and unchained control without any luck either.

Does anyone have any ideas how I would get this chained control selection to work?

Thanks

This message has been edited. Last edited by: FP Mod Chuck,


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel
November 16, 2018, 03:29 PM
MartinY
Not all clear for me but am I right assuming the below ?

You have Ctrl-A that is chained with Ctrl-B and you want Ctrl-C updated according to selection made in Ctrl-A + Ctrl-B ?

If so chained Ctrl-C to Ctrl-B.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
November 16, 2018, 03:50 PM
capples
Not quite, I have ctrl-A chained to ctrl-B. I have two separate controls, let's call them ctrl-AData and ctrl-BData. AData is a subset of A and contains the list that I want to select from ctrl-A. I use the IbComposer_setCurrentSelection('control',array, true) function to select items in ctrl-A just fine. I then want to use the list from ctrl-BData to select from ctrl-B.

The same IbComposer function does not make the selection on ctrl-B like it does on ctrl-A and the only difference that I can attribute it to is the chain from A to B.

I hope that makes sense.


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel
November 16, 2018, 03:57 PM
capples
To explain a little more of what I'm trying to do, I'm attempting to build a profile and template system where a user can make selections within a self-service page and then write them a table that stores the template of their selections.

They can then select from these list of templates and have the HTML page load the template values into hidden controls, that are then used to change the selections of the self-service controls.

I have this working for every control except for this one instance of a chained control.


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel
November 16, 2018, 05:32 PM
capples
Update, after some more testing, it doesn't appear to be the chaining that is the issue. It appears to be some type of issue with the new multi-select dropdown in 8203. If I change it from a multiselect to a single select, it appears to populate fine, with the downside of not being able to select multiple items.

There are some other funky behaviors with the multiselect dropdowns where they will populate sometimes with the javascript and not others. If I had previously selected something, it will not let me pass new values in javascript, but if I don't select anything when the page loads, it does allow me to pass with javascript.

Update 2: After switching the multiselect dropdown to multiselect listbox, everything works perfectly. So it seems to be some bugginess with the new multiselect dropdown.

This message has been edited. Last edited by: capples,


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel