ServiceNow Syntax Editor Macro | ServiceNow Introduction to Syntax Editor Macro with Demo
[Music] hi all and welcome back to the another tutorial so in today's tutorial we'll be looking on two out of those present macros okay which can help you out in uh creating a shortcut for the kodi okay so have you heard about macros before so macros are the entity which you can define in a system okay and which ease out the uh your editing skills or whenever you are writing developing code okay it can help you out with certain shortcuts i will showcase you for the shortcuts which are already pre present in this system okay so if i go to scripting i will open a script include and if i click new so it will create a raw scripture format and over here there are few shortcuts which i'll be showing for example if you want to add documentation documents on your code okay order any function so you can separate up doc and then tap so what it will do it will create a framework okay or a boilerplate comments okay for you where you can fill the descriptions and all that things what kind of input is taking what kind of output it will be returning okay this is the first one which is the second one is like in in our day-to-day activity coding activity we'll be using follow for for quite extent right okay so you don't need to write it all the time you can simply type 4 and then tap and it will generate the syntax for you okay the similar way we we create information message okay info message we add information so for that you can simply type input and space okay so it will give a syntax for adding message in your code the next one is like in if you finish cryptically you want to define a function okay if you want to define a method so for that what you can do you can do this simply type method and tap and what it will do it will create a command base for you and it will create for example i give my function number like 60 and i have the entire function body present in front of me the next most frequent thing which we use while coding is cloud record right so the next syntax which we have is variable for glide record we can simply go to variables here and select variable here and tap and it will create a clad record signature for you we also have one more which is variable gr or it creates an example for glider called our query now the thing which is which must be coming in your mind how exactly is this shortcuts are working and can we create our own shortcuts okay so definitely you can create your own shortcuts so this shortcuts are coming via macros and very quickly this macros are defined so what you have to do you have to go to the navigator and just type syntax editor macros so which is present under the system definitions under system definition you have syntax related macros and if i go over here you can see there are few macros which are already present which i have just shown you uh in the tutorial right which is dog or info method where other things right you can create your own macro also so for example if i want to create a macro to get property right system property so i will give drop okay i will add comment this is get yes.get property over here and attribute which you want a dynamic you can simply define it as a dollar size of ending with dollar okay all you can keep it is the empty object it's also works so i've just created this out and we'll save it all so i will again go to the script include see if it's there in history and over here now if i type prop and tap so it has generated the while upgrade code for me so in this way you can create your own macros okay in the servicenow system as per your project okay what exactly what syntax you are using your project more frequently and then you can use it out as a shortcut in your project okay so this is all for today's tutorial hope you like it out please like follow subscribe to my channel to get the latest subject of this kind of videos in the future till the extensive stay happy and have a nice day you
https://www.youtube.com/watch?v=BIoYQgClBhA