Skip to Content mrc logo mrc logo
  • What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • What does m-Power build?
    Solutions by Industry
    Overview Database Front-Ends AI Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization
    Spreadsheets to the Web MS Access to the Web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs & Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Development Services Training Mentoring
  • Overview Partners Press Releases Careers Events Contact Blog
  • Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • Maintainers
  • Auto Sequencing within a Maintenance Application
Back to Manual

Adding an Auto Sequential Field to your Maintenance Application

 

There will be many times when, on any data entry screen, you will want your key field to automatically query the database to see what the last number being used was and increase that by one. Using an Auto Sequential field will eliminate your end users from having to select their own key field, and it will also eliminate the need for you to create an external object that would accomplish this.

In the documentation below, we will create an Auto Sequence field for our New Customer Data Entry screen.

Select the appropriate file and fields. In our case we will select Customer Number, Name, Address, and Phone. We will also sequence by Customer Number.

Now that our fields are selected, click "Field Settings" and select the Customer Number field. In the "Field Description" add the text *AUTOSEQ.

Note: *AUTOSEQ can replace or be added to the end of the current field description.

Note: Since this field will be written to the database, the "Field Type" must be set to "Update". In addition, this field must be a numeric sequence key to utilize the auto-sequence functionality.

Click "Accept". Build/Compile your application.

At run time, we are shown this screen:

The last record in the file for Customer Number was 102061, so our application received the next one available 102062.

A common question — How can I remove the *AUTOSEQ text? Will this break my application?

You could remove the text via m-Painter, however wouldn't it make more sense to hide the entire row from view? More often than not, if you do not wish your end user to type in their own key field, you probably do not want them to see it in general. The below process will explain how to hide the row.

  1. Open m-Painter for your application.
  2. Right-click on the row you wish to hide, and click "Hide row".

While you do not see the row hidden, at run time it will not be visible. After saving the application, my screen now shows:

While we cannot see the Auto Sequenced number, it is still within the HTML and ready to be submitted to the database as soon as the user clicks the "Accept" button.

Created: February 29, 2008 | Modified: January 29, 2018

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

Freemarker Getting Started Popular Administration Video Excel Maintainers Admin Advanced Reports Java SQL Prompt Screens Data Dictionary Retrieval Dropdowns Dates Graphing Build Process RPG Tomcat Bootstrap Templates m-Painter DB2 Record Selections Database Security Form Validation Compiling Graph Properties Parameters Maintainer Performance Production Calculations Summaries mrc-Productivity Series Report Bar Graphs Retrievals App Properties External Objects Graphs Email Application Properties

See all tags »

mrc

Build the custom apps and AI tools your business needs with m-Power, or have our Chicago-based team build them with you. One platform, one team that makes sure you succeed.

Since 1981 · 1,500+ customers · 4.7/5 on G2

m-Power
Overview Demos Build Process Licensing Specs Get a Demo
Solutions
Database Front-Ends Reporting AI Tools Dashboards ERP Enhancements Modernization See all solutions
Company
Case Studies Services About Blog Careers Contact Support

Privacy Policy Cookie Policy Cookie Settings

michaels, ross & cole, ltd. (mrc)
US: 2001 Midwest Road, Suite 310, Oak Brook, IL 60523 · 630-916-0662
UK: Mortlake Business Centre, 20 Mortlake High Street, London, SW14 8JN · +44-20-335-59566
© mrc. All rights reserved.