Python Lists: Order Alphabetically & Sorting Examples

How do you sort a Python list alphabetically? There are two easy ways to sort a list in Python: using the standard sorted() function or using the .sort() list method. Assuming you have a list of strings you can apply either method to sort the list alphabetically. If you have a list of numbers and strings you can use the parameter key to change all values within the list to a str data type and then perform the necessary sort (more on that later). ...

June 10, 2023 · 9 min · 1854 words · Ryan Sheehy

Find NetSuite Field IDs: Tips and Tricks

How do you find the field ID on a Netsuite record? Whether you’re using SuiteScript or Saved Searches you will at times need to know the Field ID to use in your code or formulas. To ensure you can find the field ID on a record check your Preferences first. On the General tab make sure the Show Internal ID’s checkbox is ticked: ...

June 10, 2023 · 2 min · 278 words · Ryan Sheehy

Can't Find altemail In Saved Search Filter

Why can’t you search for altemail in a Saved Search filter? Whether you’re coding using SuiteScript or just using the Saved Search feature in Netsuite you might find it difficult to use the altemail field in Netsuite, as it doesn’t exist as a search feature in the Filter section of Netsuite’s documentation. So how do you search for this email address for your Individual Customer records where this field is used? ...

June 10, 2023 · 1 min · 88 words · Ryan Sheehy

NetSuite's IF Formula In Saved Search

Where is the IF function in Netsuite’s saved search area? It can seem quite odd at first trying to find the standard IF function in Netsuite’s saved search area, but you are not losing your eyesight, there is no IF function in Netsuite’s formulas. Instead of using an IF function you have two other types of functions available: CASE statement DECODE function Let’s explore these in a little more detail for your use case. ...

June 10, 2023 · 4 min · 720 words · Ryan Sheehy

NetSuite Saved Search Formulas: Getting Started

How do you use a formula in a Netsuite saved search? There are several different types of formulas you can use in a Netsuite saved search. They vary according to the result you are seeking to produce from numbers, text, dates and even HTML. You would use a formula when trying to calculate something that needs an operation or filter applied to a field that cannot be obtained from other fields or sources. A formula can be used created in the Criteria, Result and Highlight areas within a Saved Search. ...

June 10, 2023 · 6 min · 1139 words · Ryan Sheehy

How To Pronounce NetSuite?

How do you pronounce Netsuite? Is it Net-Sweet? The Correct Pronunciation NetSuite is pronounced as “net-sweet”. Here are some essential details you should know about the correct pronunciation The first syllable: It’s pronounced like the last part of the word “Internet“. Therefore, you should stress the “net” part and pronounce it like you would in the word Internet. The second syllable: The second syllable is pronounced like the noun “sweet”, which rhymes with the word “treat”. So, when you pronounce NetSuite, you should stress the “sweet” part and say it like you would in the word “sweet”. The emphasis: The emphasis should be on the second syllable. Therefore, you should de-emphasise the “net” part and make the “sweet” part a bit louder and with more intensity. It would be best if you didn’t make the mistake of pronouncing it as “Net-Sootee” or “Net-Sue-It.” These are common mispronunciations, and they might mislead the audience. ...

June 10, 2023 · 4 min · 709 words · Ryan Sheehy

List Comprehension In Reverse Order With Python

How do you perform a list comprehension in reverse using Python? A list comprehension is generally a short one line code that allows you to create a new list by iterating through an iterator (such as another list). The syntax for a list comprehension is [expression for variable in iterable if condition] with the if condition part being optional. The easiest way to perform a reverse iteration is to use the reversed() function on the iterable so that the list comprehension syntax is written as: [expression for variable in reversed(iterable)] . ...

June 9, 2023 · 5 min · 940 words · Ryan Sheehy

How To Remove Leading Zeroes With Python Dates

How do you remove leading zeroes in Python formatted dates? I have been sending data through to a Suitescript API endpoint and have received the error that the date information I am sending through needs to be of the format D/M/YYYY, here’s the error specifically: " " " t n m y a e p m s e e s " " a : : g " " e e I " r N : r V " o A I r L n . I v S D a u _ l i F i t L d e D S _ d c V a r A t i L e p U t E v E " a r , l r u o e r " ( , m u s t b e D / M / Y Y Y Y ) " . . . Currently, the way the date is formatted and sent from my Python code is as follows: ...

June 3, 2023 · 3 min · 478 words · Ryan Sheehy

Convert JSON To CSV In Python: Complete Code With Example

How do you convert JSON to CSV using Python quickly and easily? If you’re looking to store data received from an API that responds with JSON data and want to convert this to a CSV file then Python can easily help. Simply import the standard json and csv libraries into your Python code then read the json data into a variable and construct it to a one-dimensional format that can make it easy to store the data into a csv file. ...

June 3, 2023 · 6 min · 1222 words · Ryan Sheehy

JSON.dumps Not Able To Serialize Object

If you have tried to serialize an object in Python into JSON you may have come across an oblique error that mentions you’re unable to serialize it, but what does this mean? I recently had an example whereby I needed to transfer a dict object through to an external API endpoint and I thought by simply using the json.dumps() function that I would be able to create a json object to send through to the API. ...

June 1, 2023 · 1 min · 189 words · Ryan Sheehy