cancel
Showing results for 
Search instead for 
Did you mean: 

FSM Business Rule: Usage of JavaScript in HTML construct

christoph_kurtz2
Participant

Hi all,

We are struggling with an issue of the JavaScript integration into HTML code while creating a business rule in FSM.

The business case is that we want to use several equipments in one service call. After assignment of the related activity to the technician, he should receive an email with the list of the affected equipments. For one equipment, this works very well.

Here is the example when one equipment is listed

We want to loop over all assigned equipments and want to display them in a HTML table row. To realize that, we want to add related Javascript code into the HTML source within the <script>-tags.

After saving the source and reopen it, the tags <script> and the content in-between are deleted. Moreover, the code is not executed when assigning new activities to orders.

Do you have any idea how we can solve this situation?

Best regards,

Christoph

View Entire Topic
christoph_kurtz2
Participant
0 Kudos

Hi Wendy,

Thanks so far for your quick reply!

We want to display the equipments in an HTML table. As we don't have a limit of max. assigned equipments, this must be dynamically created and therefore, wen want to use the mentioned script.

Do you have an idea how this can be handled? If you need more details, please let me know.

Best regards,

Christoph

VishnAndr
Active Contributor
0 Kudos

Array.map method proposed by Wendy doesn't restrict you on the numbers of equipments you have. It works quite well. You can also try to use array.reduce. it might be even better in your case.