Cascade Issue

Forums Cascading dropdowns Cascade Issue

Tagged: 

Viewing 16 reply threads
  • Author
    Posts
    • #32352
      William Ellis
      Participant

      I have a cascade with 5 fields, using a simple 5 column list as the source. The fields in my destination list has all 5 fields setup as multiselect/plain text fields. I have checked all values in the source list and there are no hidden characters. I am seeing issues with the last 3 fields in the Edit form. It seems like it is comparing the value existing in the text field, including the ‘;'(delimiter) when comparing it to the values in the source list field. So both values appear in the right side ‘selected’ box, but I cannot remove the one with the ‘;’. And in the last field, it has a red box around it saying that the value is not valid. At a loss as to what is causing this. I have updated DFFS to the latest version as well.

      Here is my JS:
      spjs.casc.init(
      {
      “manualMode”:true,
      “dataSource”:””,
      “lookupList”:”regulatorcascades”,
      “lookupListBaseUrl”:”{currentsite}”,
      “lookupListFields”:[“Region”,”Country”,”Regulator”,”RegulatorShortName”,”LegalEntity”],
      “thisListFields”:[“Region:multi”,”Country:multi”,”Regulator:multi”,”RegulatorShortName:multi”,”LegalEntity:multi”],
      “setFields”:[],
      “dropDownDefaultvalue”:””,
      “filter”:””,
      “hideEmptyDropdowns”:false,
      “autoselectSingleOption”:true,
      “clearInvalidSelection”:false,
      “addOwnValue”:false,
      “addOwnValueMouseover”:””,
      “cancelOwnValueMouseover”:””,
      “sideBySide”:true,
      “multichoiceDelimiter”:”;”,
      “debug”:true
      }
      );

    • #32357
      William Ellis
      Participant

      Just an update, if I set the autoselectSingleOption to False, everything seems to work. However, I need it to be set to True as the Short Name field I’d rather have auto-set behind the scenes and not visible on the form. It will always be a single value to select from.

    • #32371
      Alexander Bautz
      Keymaster

      Hi,
      I haven’t tested it, but maybe you can try adding back the default multichoiceDelimiter including the \d (this will show each selection in a separate line when viewing in a list view or DispForm in a list item):

      "multichoiceDelimiter":";\d"

      Alexander

    • #32373
      William Ellis
      Participant

      Alexander, thank you for your quick reply! I just tried that and all it does is add the ‘;d’ to the end of the value, it doesn’t move it to another line. (see photo). This only seems to be happening for the last 3 fields where there is a single value. If I have multiple values selected for a field, it works.

    • #32376
      Alexander Bautz
      Keymaster

      Did you include the \ before the d like this?

      ";\d"

      Alexander

    • #32378
      William Ellis
      Participant

      Yes. I also set that on the New form, but it still shows the ‘;d’ at the end. Seems like if the only available value in the left pick box is selected and showing in the right selected box, then the issue happens. I’m sure it is something simple I am doing wrong, just can’t figure it out.

      spjs.casc.init(
      {
      “manualMode”:true,
      “dataSource”:””,
      “lookupList”:”regulatorcascades”,
      “lookupListBaseUrl”:”{currentsite}”,
      “lookupListFields”:[“Region”,”Country”,”Regulator”,”RegulatorShortName”,”LegalEntity”],
      “thisListFields”:[“Region:multi”,”Country:multi”,”Regulator:multi”,”RegulatorShortName:multi”,”LegalEntity:multi”],
      “setFields”:[],
      “dropDownDefaultvalue”:””,
      “filter”:””,
      “hideEmptyDropdowns”:false,
      “autoselectSingleOption”:true,
      “clearInvalidSelection”:false,
      “addOwnValue”:false,
      “addOwnValueMouseover”:””,
      “cancelOwnValueMouseover”:””,
      “sideBySide”:true,
      “multichoiceDelimiter”:”;\d”,
      “debug”:false
      }
      );

    • #32382
      William Ellis
      Participant

      Using SP 2013 and Windows 10, if that helps.

    • #32390
      Alexander Bautz
      Keymaster

      I’ll look into it tomorrow and see if I can recreate the issue.

      Alexander

    • #32393
      Alexander Bautz
      Keymaster

      I’m not able to recreate this issue. Which browser are you using?

      Also, please ensure the multiline text field is of type Plain text and not any kind of rich text.

      Alexander

    • #32399
      William Ellis
      Participant

      IE 11. All of the multi-line fields are plain text. I have tried it in IE 11 and Chrome with the same results. In the photos attached, it shows that when a single value is already in the selected field and there are no additional options to choose from, it causes the red box, which also removes all selected choices from the following field(even though there is a value in the multiline text field in the list itself, just not showing in the debug field).

      If there are two values in the selected box, and no values left to select from, it seems to work as intended.

    • #32405
      Alexander Bautz
      Keymaster

      I figured it out – if you manually specify the delimiter the string “;\d” will not be properly interpreted as a semicolon with a linefeed. If you want to keep using the default delimiter just remove the multichoiceDelimiter parameter altogether from your function call – or change the delimiter like this:

      "sideBySide": true,
      "multichoiceDelimiter": ";" + String.fromCharCode(13, 10),
      "debug": false

      Alexander

    • #32412
      William Ellis
      Participant

      I removed the delimiter line from the New and Edit forms and turned the “autoselectSingleOption”:true, back on for the Edit form. Now all of the boxes have the red outline and the ;d shows on the end of the values entered. I also tried it with your modified delimiter line. It also resulted in the same redline boxes and the ;d on the end of the values in the text boxes.

    • #32415
      Alexander Bautz
      Keymaster

      The values you have already selected and saved while the delimiter was wrong will cause this kind of error. For those records you must remove and re-select the values.

      Does it work if you do that?

      Alexander

    • #32417
      William Ellis
      Participant

      I created new records to test this. It still can’t recognize the values compared to the source list due to the ;d on the end. Here is the debug from the Edit form.

      [SPJS Cascading dropdowns v3.7.43] :: DEBUG

      Function called with these arguments:

      manualMode:true

      dataSource:

      lookupList:regulatorcascades

      lookupListBaseUrl:/sites/coo-rr-009/emea-apac-ca-latam

      lookupListFields:Region,Country,Regulator,RegulatorShortName,LegalEntity,Id

      thisListFields:Region,Country,Regulator,RegulatorShortName,LegalEntity

      setFields:

      dropDownDefaultvalue:

      filter:

      hideEmptyDropdowns:false

      autoselectSingleOption:false

      clearInvalidSelection:false

      addOwnValue:false

      addOwnValueMouseover:

      cancelOwnValueMouseover:

      sideBySide:true

      multichoiceDelimiter:;

      debug:true

      dataSourceId:regulatorcascades_061551076830822504

      numberOfDropdowns:5

      Populating this field

      Region

      Number of items returned

      3

      Populating this field

      Country

      Number of items returned

      0

      *** Please note that this debug panel cannot determin if the fieldname: “Country” in the lookup list is correct.

      *** If you are not getting the options you expected, verify the FieldInternalName: “Country” in the lookup list: “regulatorcascades”

      Populating this field

      Regulator

      Number of items returned

      0

      *** Please note that this debug panel cannot determin if the fieldname: “Regulator” in the lookup list is correct.

      *** If you are not getting the options you expected, verify the FieldInternalName: “Regulator” in the lookup list: “regulatorcascades”

      Populating this field

      RegulatorShortName

      Number of items returned

      0

      *** Please note that this debug panel cannot determin if the fieldname: “RegulatorShortName” in the lookup list is correct.

      *** If you are not getting the options you expected, verify the FieldInternalName: “RegulatorShortName” in the lookup list: “regulatorcascades”

      Populating this field

      LegalEntity

      Number of items returned

      0

      *** Please note that this debug panel cannot determin if the fieldname: “LegalEntity” in the lookup list is correct.

      *** If you are not getting the options you expected, verify the FieldInternalName: “LegalEntity” in the lookup list: “regulatorcascades”

    • #32419
      Alexander Bautz
      Keymaster

      If you have multiple different cascading dropdowns configured you must remove the multichoiceDelimiter parameter from all of them because I didn’t make this a per-instance setting so if you use it in one it will override the delimiter in all instances in the same form.

      Alexander

    • #32423
      William Ellis
      Participant

      OK, I have two different cascading dropdown groups on my Edit form. I have removed the delimiter line from the code in both. Created a new record (autoselectSingleOption set to true on the New form). Values populate correctly in the text fields with the ; as the delimiter.

      If I set the autoselectSingleOption to false on the Edit form, it recognizes the entries and no red boxes.

      However, if I set autoselectSingleOption to true, and if there is only one option available and it has been selected, the red box appears around the empty selector box and it displays both the value with the ; and the one without it in the selected box, similar to how it has failed previously.

      I alos tried it with the “multichoiceDelimiter”: “;” + String.fromCharCode(13, 10), line added into all four places (New and Edit forms) but with the same results.

    • #32425
      Alexander Bautz
      Keymaster

      I’ll look into it some more over the weekend, but if you could email me a few screenshots of your datasource (just a few items) and any other relevant info so I can recreate the same dataset and setup as you are using it would be great (just email it to the address you get the forum notifications from).

      Alexander

Viewing 16 reply threads
  • You must be logged in to reply to this topic.