Now Assist for code generation

Abdellah TAHRI
Tera Contributor

With code generation capability, you can describe the code that you want to generate in natural language, and the platform will generate the Javascript code.

It’s extremely powerful and very productive, because codes and scripts will be created faster.

 

Before you start

 

Verify that Now Assist for code generation is Active :

The capability is enabled, if you see the following message in any scripting box :

 

AbdellahTAHRI_0-1738074405977.png

If not :

Go to Now Assist Admin > Features

 

AbdellahTAHRI_1-1738074405982.png

 

Select Creator

 

AbdellahTAHRI_2-1738074405983.png

 

Make sure that Code capability is Active

AbdellahTAHRI_3-1738074405985.png

 

Verify that the now.assist.creator role is granted to the user , and note that this role is not inherited from admin role .

 

How to use the code generation capability ?

 

There are two different modes for code generation, comment to code and code complete. Let’s start with comment to code (text2code):

From the script editor :

 

Right click and select

 

AbdellahTAHRI_4-1738074405986.png

 

Describe want you want to do with the code :

 

AbdellahTAHRI_5-1738074405988.png

 

For example , when I want to use GlideAjax , I’m used to seek help from google to get some examples and then I create my own code .

Now with Now Assist , I can get it directly in the script box .

 

AbdellahTAHRI_6-1738074405990.png

 

You can Accept or Reject the code suggestions:

 

AbdellahTAHRI_7-1738074405991.png

 

The second mode is about completing codes .

If you started coding with the following two line of codes, and after submitting:

 

AbdellahTAHRI_8-1738074405992.png

 

Now Assist generates lines of codes to complete your script :

 

AbdellahTAHRI_9-1738074405992.png

Important:

Please note that, it’s not because the code generation is very easy to use that you need to create codes, keep in mind, we create codes only if needed .

If you have to create scripts then use the capability for time savings.

0 REPLIES 0