mrc logo mrc logo
  • m-Power m-Power
    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
  • Solutions Solutions
    What does m-Power build?
    Overview Database Front-Ends 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 and Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Services Services
    Development Services Training Mentoring
  • About About
    Overview Partners Press Releases Careers Events Contact Blog
  • Support Support
    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

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

See all tags »

michaels, ross & cole, ltd. (mrc)

Privacy Policy Cookie Policy Cookie Settings Notice at Collection Do Not Sell or Share My Personal Information

mrc (US)

2001 Midwest Road
Suite 310
Oak Brook, IL 60523
630-916-0662

mrc (UK)

Mortlake Business Centre
20 Mortlake High Street
London, SW14 8JN
+44-20-335-59566


© 2024 mrc. All rights reserved.