• Jacob Edelman
    September 20, 2016 at 10:00 am #2678

    I am noticing that when I change the item in a drop down (Single Select CV) that uses AJAX to populate the value options, ALL of the rows are changed to the same selection.

    Am I doing this correctly?  Is there a way around this?

    SPARK Support
    September 20, 2016 at 5:00 pm #2683

    Hi Jacob,

    You should be able to configure the Single Select to use items from a service and independently choose the selection.

    Can I see how you have the Single Select configured under the Configuration > Items?

    Regards,

    Stephen P.

    Jacob Edelman
    September 20, 2016 at 6:25 pm #2689

    I guess I was using an config list instead of an AJAX list.  I would still expect it to function differently.

    Jacob Edelman
    September 21, 2016 at 8:41 am #2695

    Interesting, this works when I switch to an AJAX service, but not for a list from config bound to a BO.

    SPARK Support
    September 21, 2016 at 9:41 am #2696

    Hi Jacob,

    If you clear the binding from the Item List where you have accountTypeOptions[], it should work fine.

    Regards,

    Stephen P.

    Jacob Edelman
    September 21, 2016 at 1:55 pm #2713

    OK, that works, but how can I get it to work for a non AJAX service input?  If I want to do from config option for example.

    SPARK Support
    September 21, 2016 at 2:35 pm #2726

    Hi Jacob,

    Items from a Service, Static List, or Config Option should all work the same as long as your Item List is not bound. The Config option simply takes the list from a variable input when using the Single Select within a nested Coach View.

    Regards,

    Stephen P.

    Jacob Edelman
    September 21, 2016 at 2:37 pm #2727

    It doesn’t appear to work with the non AJAX option.  making a selection in the dropdown in any row changes the values in ALL the rows.

    SPARK Support
    September 21, 2016 at 3:02 pm #2729

    Jacob,

    You need to check your config options. See my screenshots of the running process.

    The nested Coach View works with the Item List bound as a Config Option, and the Static List works with no bound Item List.

    Regards,

    Stephen P.

    Sabina Rosa Olga Luzzatti
    October 10, 2016 at 2:54 am #2840

    Sorry but I have Jacob’s problem and I agree with him that the single select used more times in the
    same coach (i.e. in a Table) with values taken from a bound variable (not from ajax service)
    doesn’t behave as expected: this means that when I change the value in one select, all the selects
    in the coach, bound to the same variable, change the shown value (this doesn’t affect the selected value of each control, that is correct!!).

    Please help.

    In the attached images there is a sample where the single select of the table is taken from the bound object departments . The bound object has been filled with a list of Department. The attributes of the complex object to use an name and value are deptname and deptno.

    The values are shown in the right way when the table is loaded but once I change one of the values of the select all the shown values are updated with the new one. The problem is a visual problem, because if I check value of the property bound to the select (employees.currentItem.workdept), only one value has been updated (as expected) not all .

    SPARK Support
    October 10, 2016 at 10:05 am #2846

    Hi Sabina,

    All of your Single Select lists are changing because you have the Item List bound to your departments[] variable.  Using Items From a Config Option should be used when the Single Select is nested in a coach view.  If the Single Select is on the current Coach, Items from a Static List or Service should be used instead.

    Please look at the following screenshots.  In the first screenshots, I have a nested CV containing a Single Select with Configuration Options set as inputs for the selection list.  The list variable is bound to the Items list configuration option, which is now the only config option in the external settings.  In the Second screenshot, the nested Coach View’s Configuration Options are displayed containing NVP List that will be used for the selection list.  The third screenshot shows the configuration of the nested coach view’s Single Select which now takes the Items list from a Configuration option of the Coach View.

    The fourth and fifth screenshots show items coming from a Service, and not that the List Variable is not bound in the configuration options.

    Regards,

    Stephen P.

    Sabina Rosa Olga Luzzatti
    October 11, 2016 at 6:55 am #2855

    Hi Stephen,
    thank you for the answer and the examples but the problem is unsolved even if I use a nested CV and configuration Options.
    The scenario is:
    – Client Side Human Service (CSHS) with a nested Coach View.
    The nested coach view  has a bound object–> list of Employee  and a config option–> list of Department (See CoachViewVariables.jpg).
    The nested CV layout consists of a Table whose first column is a Single Select. The elements of the single select are taken from a list of Department specified as Config Option.
    The binding of the Single Select is employees.currentItem.workdept. (See CVLayout.jpg, CVSelectItems.jpg).
    The CSHS creates the list of Departments and Employees. The list of departments is passed as config option to the CV while the list of employees is the CV bound object. Once loaded the table appears as follows and as I expect.(See Fig1.jpg).
    I log the values of department and last name of each element in the table and I get:

    Employee dept BEFORE —————–>D11 // E21//D11
    Employee LAST NAME BEFORE—————->ADAMSON // ALONZO//BROWN

    If I use the select to change the workdept of the second row (See Fig2.jpg), all the shown values in all rows of the table change (See Fig3.jpg) while the bound object change only for the second row, as expected as shown in the log that I get whenthe OK button is clicked.

    Employee dept AFTER —————–>D11 // H22//D11
    Employee LAST NAME AFTER—————–>ADAMSON // ALONZO//BROWN

    I don’t know what I have missed but it seems to me that Single Select bound as config option cannot be used as coach view in a table. Is it true? If not I’d like to get a working example, if possible.

    Thank you

    Sabina

    SPARK Support
    October 11, 2016 at 7:42 am #2863

    Hi Sabina,

    Can you upload a copy of your TWX file here:

    https://sftp.salientprocess.com/sharing/5ZlangFwt

    Regards,

    Stephen P.

    Sabina Rosa Olga Luzzatti
    October 13, 2016 at 2:51 am #2870

    Hi Stephen,

    I’ve uploaded the twx.

    Regards

    Sabina

    SPARK Support
    October 19, 2016 at 2:29 pm #2901

    Hi Sabina,

    Since the Single Select is looking for a Name Value Pair, I modified your init script to populate a NVP variable:

    for (var x = 0; x< codes.length; x++) {
    var d = new tw.object.Department();
    var dn= new tw.object.NameValuePair();
    d.deptno = codes[x];
    d.deptname = descriptions[x];
    dn.name = codes[x];
    dn.value = descriptions[x];
    d.mgrno = mgrno[x];
    tw.local.departments.insertIntoList(tw.local.departments.listLength, d);
    tw.local.departmentsNVP.insertIntoList(tw.local.departmentsNVP.listLength, dn);
    }

    Then in the Work Dept Single Select on TestCV coach, I used the configuration in the screenshot calling the Item lookup a Static List and binding to the configuration variable

    Regards,

    Stephen P.

     

    Sabina Rosa Olga Luzzatti
    October 20, 2016 at 1:21 am #2904

    Thank you very much.

    With your help now everything works well.

    Sabina

    SPARK Support
    October 20, 2016 at 6:55 am #2908

    Hi Sabina,

    I’m glad we could help.

    Regards,

    Stephen P.

    Siddharth Gadekar
    April 20, 2018 at 5:59 am #5112

    Hi,

    I am still facing this issue.

    I have created a custom type NameValue and bound it to Item Config option to a select box in a table.

    I tried using the nested CV approach as you suggested but that didn’t work either.

    Please let me know how to fix this.

     

Viewing 18 posts - 1 through 18 (of 18 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search