Hi Linda,
Thanks for trusting us and posting in this community, we are glad to offer help if anyone encounters general problems and issue when using SharePoint Online, but according to your description, considering that your question focus on custom coding, which is beyond our support scope, as @Leo suggested, we would like to recommend you post a new thread in the following forums, these are our dedicated platforms that can cope with the related questions and issues.
Reference:
- SharePoint - Microsoft Tech Community
- Use column formatting to customize SharePoint | Microsoft Docs
We are willing to help you, but we are afraid of providing any incorrect information that may not benefit you, we sincerely hope you can get the problem solved with the help of experienced supports and community members. We also welcome any community members to share any idea about your situation if one has related experiences.
Your understanding will be highly appreciated.
Best Regards,
Arck