How to capture the emojis in the update set.

Archana23
Tera Contributor

How to capture the emojis in the update set.

1 REPLY 1

Chaitali_Vale
Mega Sage
Mega Sage

Hello @Archana23 ,

To capture emoji in an update in ServiceNow, you'll need to consider a few steps:

1. **Create a Text Field:** First, you need a field in your table to capture emoji. Create a new text field or use an existing one. Make sure the field allows Unicode characters, as emojis are Unicode characters.

2. **Update the Field:** When you update a record in ServiceNow, make sure to set the value of the text field to the emoji you want to capture. You can do this using business rules, client scripts, or server-side scripts depending on your use case.

3. **Displaying Emojis:** To display emojis in ServiceNow, you can use the g-emoji HTML class. For example, if you have a field named "emoji_field" in your record, you can display its value as an emoji like this:

html
<span class="g-emoji">{{record.emoji_field}}</span>

This will render the emoji stored in the field.

4. **Testing:** Ensure that you can successfully capture and display emojis by testing the updates you make. You can do this by updating records through forms or scripts.

5. **Encoding and Storage:** ServiceNow typically uses UTF-8 encoding for text fields, which supports emoji characters. Make sure your database and fields are configured to handle UTF-8 encoding to store emojis correctly.

Please mark my solution as Helpful/Correct, if applicable. 

Thanks & Regards,
Chaitali Vale