The Edkins Group - Zoho Experts to Help Your Business Grow
  • Knowledge
    • Zoho Masters
    • Learn >
      • Zoho Video Tutorials >
        • Client Calls
        • Zoho Books Videos
        • Zoho Creator Videos
        • Zoho CRM Videos
        • Zoho Projects Videos
        • Zoho Sign Videos
      • Virtual School >
        • Get a Free Course
  • Zoho
    • End to End Small Business System
    • Small Business Accounting
    • App Demo Pages >
      • Calendar Scheduling
      • Web Tracking and Chat
      • Maximize Your Website
      • Online Meetings
      • Email Campaigns
      • Social Media
      • Customer Tracking
      • Sale Team Motivation
      • Customer Help Desk
      • Accounting
      • Project Management
      • Agile Management
      • Email
      • BI / Analytics
      • Note Taking
      • Instant Messaging
      • Surveys
      • Train Your Team
      • Staff Recruiting
      • File Sharing
    • Start Your FREE Trial
  • WorkDrive Widget

Create a Custom Auto-Number Field in Zoho Creator

7/3/2020

1 Comment

 
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;
}
1 Comment
sri
1/1/2024 11:56:15 pm

lastorder variable name, which variable name is used?

Reply



Leave a Reply.

    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 ©2025  All Rights Reserved | Tampa, Florida  |  813.510.5131
Dripify  |  Business Phone System |  Join the Group | Privacy Policy
  • Knowledge
    • Zoho Masters
    • Learn >
      • Zoho Video Tutorials >
        • Client Calls
        • Zoho Books Videos
        • Zoho Creator Videos
        • Zoho CRM Videos
        • Zoho Projects Videos
        • Zoho Sign Videos
      • Virtual School >
        • Get a Free Course
  • Zoho
    • End to End Small Business System
    • Small Business Accounting
    • App Demo Pages >
      • Calendar Scheduling
      • Web Tracking and Chat
      • Maximize Your Website
      • Online Meetings
      • Email Campaigns
      • Social Media
      • Customer Tracking
      • Sale Team Motivation
      • Customer Help Desk
      • Accounting
      • Project Management
      • Agile Management
      • Email
      • BI / Analytics
      • Note Taking
      • Instant Messaging
      • Surveys
      • Train Your Team
      • Staff Recruiting
      • File Sharing
    • Start Your FREE Trial
  • WorkDrive Widget