question

MelissaReeder-0752 avatar image
0 Votes"
MelissaReeder-0752 asked TongZhangMSFT-7548 commented

SharePoint Accordion and Cascading javascript

I have a cascading list (using JavaScript) and I was trying to use the accordion. Both work when you first create a record, However, when you edit the record, the content from the cascading field is deleted. Is this because of two java scripts on the same page?

sharepoint-workflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TongZhangMSFT-7548 avatar image
0 Votes"
TongZhangMSFT-7548 answered TongZhangMSFT-7548 commented

Hi @MelissaReeder-0752,

To help you better, can you provide specific steps or relevant code to reproduce this problem?

In addition, according to my research , I found an article about executing two java scripts on the same page, you can refer to it and check if this is the cause of the problem. Hope it can help you.

For reference:
executing two java scripts on the same page

Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cascade:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>;
<script>
$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "EAS_BP",
relationshipListParentColumn: "SBU",
relationshipListChildColumn: "Title",
parentColumn: "Strategic_Business_Unit",
childColumn: "BU"
});
});
</script>


Accordion ... here is the top section


198557-image.png


0 Votes 0 ·
image.png (43.5 KiB)

Hi @MelissaReeder-0752,

Based on my research and testing, this could be due to multiple jQuery calls. As a workaround, please try to clean up, and put jQuery on the top of script.

0 Votes 0 ·

Hi @MelissaReeder-0752,

I am checking to see if the problem has been resolved .If you have any questions or progress, you can contact me in time.

0 Votes 0 ·