The Edkins Group - Zoho Experts to Help Your Business Grow
  • Zoho Consulting
  • Zoho One
  • Zocademy
    • Free Quickstart Course
    • Client Calls
    • Zoho Books Videos
    • Zoho Creator Videos
    • Zoho CRM Videos
    • Zoho Projects Videos
    • Zoho Sign Videos
  • Book Time

Create a Custom Auto-Number Field in Zoho Creator

7/3/2020

0 Comments

 
Have you wondered how you could create an auto-number field in Zoho Creator?

Well, you're in luck, this video will provide the answers you need. In this video we show you how to create a specialized auto number field that is specific to a particular type of order and the year the order was placed.

The example we have is [order type] - [auto number] - [year of order] so it looks like this: P-200-2020

Then the next one would be P-201-2020

Link to start your free trial of Zoho ONE: https://www.edkinsgroup.com/zoho-free-trial.html

The YouTube Zocademy channel is meant to provide educational information regarding business best practices with an emphasis on the Zoho Platform. Our objective is to empower people like yourself to learn how to get more done with less. We also have a website where you can purchase mini-courses to learn more in depth. We also offer memberships. The memberships include access to all mini-courses each month. Feel free to visit at: www.zocademy.com

The Code**

​lastOrder = New_Order[Order_Type == input.Order_Type] sort by Added_Time DESC range from 1 to 1;
info lastOrder.Order_Number;
// type-auto number-year
theYear = Today.getYear();
info theYear;
if(input.Order_Type == "Product")
{
orderType = "P";
}
else if(input.Order_Type == "Service")
{
orderType = "S";
}
else
{
orderType = "PS";
}
if(lastOrder.count() > 0)
{
getSuffixFirstDash = lastOrder.Order_Number.getsuffix("-");
info getSuffixFirstDash;
getNumber = getSuffixFirstDash.getprefix("-");
info getNumber;
newNumber = getNumber.toDecimal() + 1;
info "the new number is: " + newNumber;
input.Order_Number = orderType + "-" + newNumber + "-" + theYear;
}
else
{
input.Order_Number = orderType + "-" + 1 + "-" + theYear;
}
0 Comments
    Zoho Creator Video Training

    Video Learning Page

    join today

    Author

    David Edkins is an expert of the Zoho platform.

    Over the years David has worked with hundreds of small businesses in almost as many different industries to bring you the expertise you need to move your business forward - quickly.

    Book a quick call to see how he can help you.

    book time

    Archives

    July 2020

    Categories

    All
    Integration
    On Field Update
    Workflows
    Zoho Creator Script

    RSS Feed

The Edkins Group ©2020  All Rights Reserved | Rocklin, CA  |  916.262.7295
 Get Ring Central  |  Presentation of Zoho One
Picture
  • Zoho Consulting
  • Zoho One
  • Zocademy
    • Free Quickstart Course
    • Client Calls
    • Zoho Books Videos
    • Zoho Creator Videos
    • Zoho CRM Videos
    • Zoho Projects Videos
    • Zoho Sign Videos
  • Book Time