Blog

Your First PHP Script! 🫵

If you are interested in learning PHP, creating your first PHP script is a great place to start. PHP is a popular programming language used for web development and can be used to create dynamic and interactive websites. Here are the basic steps to get started with your first PHP script:

Step 1: Set up your development environment
Before you start writing PHP code, you need to set up your development environment. You will need a web server, PHP interpreter, and a code editor. You can install all of these separately or use a pre-packaged solution like XAMPP or WAMP. These packages include everything you need to get started.

Step 2: Create a new file
Open your code editor and create a new file with a .php extension. This is where you will write your PHP code.

Step 3: Write your code
Now it’s time to write your first PHP script. In its simplest form, a PHP script is just a set of instructions that the PHP interpreter can execute. Here’s an example:

PHP code example
<?php
echo "Hello, world!";
?>
This code will display the message “Hello, world!” on the web page.

Step 4: Test your script
Once you’ve written your PHP script, you need to test it to make sure it works. Save the file and put it in your web server’s document root directory. Open a web browser and navigate to http://localhost/your-file-name.php. You should see the output of your PHP script on the web page.

Now that you’ve created your first PHP script, you can start exploring the language further. Here are five common PHP functions you might find useful:

echo()
The echo() function is used to output text to the web page. It can be used to output HTML, CSS, and JavaScript as well as plain text.

PHP code example
<?php
echo "This is some text.";
?>

strlen()
The strlen() function is used to get the length of a string.

PHP code example
<?php
$text = "This is some text.";
echo strlen($text);
?>

strpos()
The strpos() function is used to find the position of the first occurrence of a substring in a string.

PHP code example
<?php
$text = "This is some text.";
echo strpos($text, "is");
?>

date()
The date() function is used to format a date and time string.

PHP code example
<?php
echo date("Y-m-d H:i:s");
?>

include()
The include() function is used to include a PHP file in another PHP file.

PHP code example
<?php
include("header.php");
?>
These are just a few examples of what you can do with PHP. As you learn more about the language, you can start to create more complex scripts and build dynamic and interactive websites.

Upgrading Your Laptop/Desktop RAM Far Beyond The Manufacturer Specifications! 💻🖥️

I recently upgraded my laptop's RAM far beyond its manufacturer specifications, and I have to say, the performance improvement has been phenomenal. I had a Dell Inspiron 15 - 3567 (3000-Series) laptop, and according to the documentation manual, it supported a maximum of 16GB DDR4 RAM. However, I found out through Compuram.biz that it can actually support up to 64GB of RAM!

Compuram.biz is a website that provides actual tested maximum memory limits for thousands of systems, and I highly recommend it to anyone who wants to upgrade their RAM. With this information, I was able to find compatible RAM upgrades for my laptop and take advantage of its maximum potential.

I ended up upgrading my laptop's RAM to 32GB, which is double the manufacturer specification, and the difference in performance is night and day. My laptop now runs much faster and can handle more demanding tasks with ease. I no longer experience any lag or stuttering when multitasking or running resource-intensive applications.

For those interested in upgrading their Dell Inspiron 15 - 3567 (3000-Series) laptop's RAM, I recommend checking out this link on Compuram.biz for available memory upgrades: https://www.compuram.biz/memory/dell/notebook/inspiron/3000-series/15-3567/?st=tab_maxmem. It provides a variety of compatible RAM options for your laptop, and you can select the one that suits your needs and budget.

It's important to note that before making any upgrades, you should check your warranty status and ensure that your operating system and processor support the upgraded RAM capacity. You should also purchase RAM sticks from reputable manufacturers and dealers to ensure compatibility and reliability.

In conclusion, upgrading your laptop or desktop's RAM far beyond the manufacturer specifications can have a significant impact on its performance. With the help of websites like Compuram.biz, you can easily find compatible RAM upgrades for your system and take advantage of its maximum potential. Just remember to take the necessary precautions and follow proper installation procedures to avoid any issues.

5 Common GlideRecord Functions And Their Uses 📜

ServiceNow is a powerful platform used by businesses to manage their IT service management needs. GlideRecord scripts are an essential part of ServiceNow and allow developers to perform queries and manipulate data within tables. In this article, we will discuss the 5 most common GlideRecord scripts and their use cases.

  1. addQuery(): This script is used to add a filter to a query. It allows you to narrow down your search results by specifying certain conditions. For example, if you want to find all incidents that are assigned to a particular user, you can use the addQuery() script to filter the results by the assigned_to field.

  2. get(): The get() script is used to retrieve a single record from a table. It is useful when you want to retrieve a specific record that matches certain conditions. For example, if you want to retrieve the details of a particular incident, you can use the get() script to retrieve the record based on the incident number.

  3. update(): The update() script is used to update a record in a table. It is useful when you want to modify certain fields in a record. For example, if you want to update the priority of an incident, you can use the update() script to modify the priority field.

  4. deleteRecord(): The deleteRecord() script is used to delete a record from a table. It is useful when you want to remove a record that is no longer needed. For example, if you want to delete a closed incident, you can use the deleteRecord() script to remove the record from the incidents table.

  5. newRecord(): The newRecord() script is used to create a new record in a table. It is useful when you want to add a new record to a table. For example, if you want to create a new incident, you can use the newRecord() script to create a new record in the incidents table.

In conclusion, GlideRecord scripts are an important part of ServiceNow development. By mastering these 5 common scripts, developers can perform queries, retrieve, update, delete and create records in tables within ServiceNow. With the growing demand for ServiceNow developers, mastering GlideRecord scripts can lead to exciting career opportunities.

Getting Started With ServiceNow GlideRecord Scripts With Examples

If you are new to ServiceNow development, the GlideRecord script is an essential tool to master. GlideRecord scripts allow you to interact with the database and retrieve, insert, or modify records in ServiceNow. Here are the basic steps to get started with GlideRecord scripts:

Step 1: Understand the Basics Before you start writing GlideRecord scripts, it's important to have a basic understanding of JavaScript and the ServiceNow data model. You should also have access to a ServiceNow instance to practice on.

Step 2: Create a New Script To start a GlideRecord script, you first need to create a new script include or business rule. In the script, you can specify which table or tables you want to interact with.

Step 3: Define the GlideRecord Object Next, you need to define a GlideRecord object. This object represents a table in the ServiceNow database and is used to interact with the table's records.

Here are the six most common GlideRecord functions and examples of how they are used:

  1. addQuery() - The addQuery() function allows you to add a query condition to your GlideRecord object. You can use this function to retrieve specific records from the table.

Example:

var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('priority', '1');
incidentGR.query();

In this example, the GlideRecord object is created for the incident table, and the addQuery() function is used to add a condition where the priority field equals 1. The query() function is then called to execute the query and retrieve the matching records.

  1. addEncodedQuery() - The addEncodedQuery() function allows you to add a query encoded as a string to your GlideRecord object. This is useful when you want to construct a complex query using multiple conditions. Here's an example:
var gr = new GlideRecord('incident');
gr.addEncodedQuery('priority=1^ORpriority=2');
gr.query();
while (gr.next()) {
  // do something with the records
}
In this example, the addEncodedQuery() function is used to construct a query that returns incidents with a priority of either 1 or 2. The query() function is then called to execute the query, and the while loop is used to iterate through the result set.
💡 Pro Tip: If you can use the filters on a list page in ServiceNow to filter the correct data that you want to see, you can right click on the breadcrumbs link on the top left of the page and you will get an option to "Copy query". This will copy the encoded query to your clipboard that is needed in the script above. This should help you speed up your development time so you don't have to learn what all of the symbols mean.
  1. getValue() - The getValue() function retrieves the value of a field in the current GlideRecord object.

Example:

var incidentGR = new GlideRecord('incident');
incidentGR.get('number', 'INC0010001');
var shortDesc = incidentGR.getValue('short_description');

In this example, the GlideRecord object is created for the incident table, and the get() function is used to retrieve the record with the number INC0010001. The getValue() function is then used to retrieve the value of the short_description field for that record.

  1. setValue() - The setValue() function allows you to set the value of a field in the current GlideRecord object.

Example:

var incidentGR = new GlideRecord('incident');
incidentGR.get('number', 'INC0010001');
incidentGR.setValue('state', '2');
incidentGR.update();

In this example, the GlideRecord object is created for the incident table, and the get() function is used to retrieve the record with the number INC0010001. The setValue() function is then used to set the state field to 2, indicating that the incident is in progress. The update() function is then called to save the changes to the record.

  1. insert() - The insert() function allows you to insert a new record into the current GlideRecord object.

Example:

var incidentGR = new GlideRecord('incident');
incidentGR.initialize();
incidentGR.setValue('short_description', 'New Incident');
incidentGR.insert();

In this example, the GlideRecord object is created for the incident table, and the initialize() function is used to create a new, empty record. The setValue() function is then used to set the short_description field, and the insert() function is called to save the new record to the database.

  1. deleteRecord() - The deleteRecord() function allows you to delete the current record from the GlideRecord object.

Example:

var incidentGR = new GlideRecord('incident');
incidentGR.get('number', 'INC0010001');
incidentGR.deleteRecord();

In this example, the GlideRecord object is created for the incident table, and we use the get() function to lookup the exact record that we want in this situation, then use the deleteRecord() function to delete this incident from the table.

These are just a few of the most common GlideRecord functions. By learning how to use these functions effectively, you can create powerful scripts that automate processes, simplify workflows, and make your ServiceNow instance more efficient.

ServiceNow Technical Consultant Positions Are In Demand! Should You Make The Switch? 🪙

As the demand for ServiceNow solutions continues to grow, so does the demand for ServiceNow Technical Consultants. If you're considering a career in the IT industry, becoming a ServiceNow Technical Consultant could be a great option for you. Here are some of the benefits of pursuing this career path, as well as tips on how to get started.

What is a ServiceNow Technical Consultant?

A ServiceNow Technical Consultant is responsible for designing, implementing, and maintaining ServiceNow solutions for clients. They work with clients to understand their business processes, identify areas for improvement, and develop solutions using ServiceNow technology.

Benefits of becoming a ServiceNow Technical Consultant

  1. High demand: ServiceNow is one of the fastest-growing cloud-based software companies in the world, and the demand for ServiceNow Technical Consultants continues to grow. This means that there are plenty of job opportunities available for those with the right skills and experience.

  2. Lucrative salary: The average salary for a ServiceNow Technical Consultant is around $100,000 per year, and it can go up to $150,000 per year or more depending on experience and expertise.

  3. Variety of work: ServiceNow Technical Consultants work on a variety of projects, which keeps the job interesting and challenging. They work with clients from different industries and can work on projects ranging from small-scale implementations to large, enterprise-wide implementations.

  4. Flexibility: Many ServiceNow Technical Consultants work on a contract or freelance basis, which provides them with the flexibility to choose their own hours and work from anywhere in the world.

How to get started as a ServiceNow Technical Consultant

  1. Gain ServiceNow knowledge: To become a ServiceNow Technical Consultant, you need to have a strong understanding of the ServiceNow platform. You can start by taking free ServiceNow training courses available on the ServiceNow website or signing up for the ServiceNow Developer Program.

  2. Get certified: ServiceNow offers several certifications that can help you demonstrate your expertise in the platform. Some popular certifications for ServiceNow Technical Consultants include Certified Implementation Specialist and Certified System Administrator.

  3. Gain experience: To land a job as a ServiceNow Technical Consultant, you'll need to have some experience working with the platform. Look for internships or entry-level positions at companies that use ServiceNow or consider contributing to open source ServiceNow projects.

  4. Network: Attend industry events and connect with other ServiceNow professionals on LinkedIn or other social media platforms. Building relationships with others in the industry can help you learn about job opportunities and gain valuable insights into the ServiceNow ecosystem.

In conclusion, becoming a ServiceNow Technical Consultant can be a rewarding career path with plenty of opportunities for growth and advancement. By gaining ServiceNow knowledge, getting certified, gaining experience, and networking, you can set yourself up for success in this exciting field.