mrc logo mrc logo
  • Explore m-Power Explore m-Power
    What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    What does m-Power build?
    Overview Data Exploration Reporting Business Intelligence Dashboards Mobile Apps ERP Enhancements Modernization Spreadsheets to the web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow
  • Services Services
    Overview Training Project Consulting Staff Consulting Mentoring
  • About About
    Overview Partners Press Releases Careers Events Contact Blog
  • Resources Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • Support Support
    Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • Form Validation
  • Validating via a Java External Object Source Code
Back to Manual

Validating via a Java External Object Source Code

 

package MRCWORKLIB;

public class Validate
{
    public void valid_fields(String[] args)
    {
        String strdatex = args[1].replaceAll(",", "");
        String enddatex = args[2].replaceAll(",", "");
        int strdate = Integer.parseInt(strdatex);
        int enddate= Integer.parseInt(enddatex);

        if ((strdatex.compareTo("0") == 0 ) && (enddatex.compareTo("0") == 0 ))
            {
            args[0] = "You have not entered any dates";
            return;
            }

        else if (strdatex.compareTo("0") == 0)
            {
            args[0] ="You must enter a starting date";
            return;
            }

        else if (enddatex.compareTo("0") == 0)
            {
            args[0] = "You must enter an end date";
            return;
            }
        else if(strdate > enddate)
            {
            args[0] = "Starting Date is greater than End Date";
            return;
            }
        else return;
    }
}

Created: February 10, 2010 | Modified: December 22, 2011

Search


Browse By Category

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

Popular Tags

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

See all tags »

michaels, ross & cole, ltd. (mrc)
Privacy Settings Privacy Policy Cookie Policy Employee Intranet
© 2018 mrc. All rights reserved.
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