Best way to create a multi-step validation process

I am writing a multi step validation process and I was wondering what is the best method to have it operate on the value.  What I have:
As a custom validation script, in that order:
1- Calls a function that looks if the value is part of a particular array
2- Calls a function that regroup some tests
     2a- function test1()
     2b- function test2()
     2c- function test3()
     2d- function test4()
What I have now is every test ends as 'event.rc = false' when they fail which is what I need but I also need to stop the entire validation process.  As an example, if the value fails test2() and gets a "you have failed test 2" alert, I don't want to call test3() and test4() since it is already decided that it failed one of the tests.  I could return a boolean that triggers (or not) the next test() but isn't there a simple way to just say
event.rc = false;
"STOP EVERYTHING";
I have the assumption that break; will only stop the test() but still move on to the next test().  Maybe I can return break; so it will be called from the 'master function'?   Is that even possible?

Create another function and call it from the validation script, something like:
function validate_field() {
    // Call the first validation routine
    test0();
    // Abort if first validation fails
    if (!event.rc) return;
    // Call the second validation routine
    test1();
    // Abort if second validation fails
    if (!event.rc) return;
    // Repeat for any other tests

Similar Messages

  • WHAT IS THE BEST WAY TO CREATE AN XSD FILE (TO BE USED BY SOAP ADAPTER)

    Dear friends
    I have a simple scenario.
    OUTBOUND DATA  -->  SOAP ADAPTER  --> ( XI )  -->  RFC ADAPTER  --> INBOUND DATA
    The XML file that I got from mapping area of IR (Design) is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_NAME_SOURCE xmlns:ns0="http://test3.com">
       <FIRSTNAME>DAVE</FIRSTNAME>
       <LASTNAME>SMITH</LASTNAME>
    </ns0:MT_NAME_SOURCE>
    If you notice, there are only 2 fields.
    I need to create an XSD file and import it as an external object, which I can use for SOAP Adapter.
    Which is the best way to create it.
    Also, I need to know if there is any step by step of sending a message from XML SPY. I have downloaded this software, but am not able to undertand how to use this.
    Hope to hear from any experts on this forum.
    Thanks in advance
    Ram

    Hi Ram,
    See the below blog..
    It shows how to send SOAP message using XML Spy.
    It also shows how to generate wsdl.
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    Regards,
    Sumit

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • What is the best way to create 10000 users in ECC system

    Dear all,
    what is the best way to create 10,000 users in ECC 6 system.
    As of my knowledge we can create with SECATT, but I don't know the procedure to use this.
    please guide me...
    Regards,
    Raaja

    Hi Raaja,
    If you search in SDN or on google for eCATT tutorial, you will get all the info you need to learn to create them.
    For 10000 users I would suggest the following
    1. eCATT to create user ID's (include all the info like passwords, user groups in here).
    2. eCATT to make the role assignment.  Use SU10 to record the assignment to the users you created with the first script as it gives you more flexibility
    If you have the data you need then you should be able to run both steps in 1 work day (dependent on system performance).
    Edited by: Alex Ayers on Jan 25, 2009 11:16 AM

  • Best way to create a Keynote presentation for use in Windows Powerpoint?

    Hi all, as mac users, I know we have all been here,  I am being forced to use Powerpoint and a Windows machine for a presentation.   I am wondering what is the best way to create a keynote presentation (on my mac), and export it to powerpoint (on a windows machine). The goal here is try to get as few errors and missing components of the presentation as possible. I frequently have to export and import documents through Microsoft word and pages, and everytime I open a doc I get a message saying that some things couldn't be imported. This cannot happen in this situation! This is a very important presentation that needs to go as smooth as possible. I am going to be presenting this presentation on a windows 7 machine running microsoft office 2010.
    What extra steps should I take (if any) to make sure everything gets exported and imported correctly?
    Thanks in advance,
    - A Mac user under Windows Oppression

    Thanks, the presentation went well. I just had to try out different transitions and animations to see which ones worked with Pp. But I'm going full keynote next time!
    Happy Computing,
    - A Mac user no longer under windows oppression

  • Best way to create an employeeid

    dear experts;
    What is the best way to create an employeeid...if I am not planning on using sequence...

    user13328581 wrote:
    dear experts;
    What is the best way to create an employeeid...if I am not planning on using sequence...A klunky alternate solution follows. Not good, but you are excluding the easiest way of using a sequence - this is precisely what sequences are for.
    Hoek's idea to use SYS_GUID looks promising if you must use another method. I was on a project awhile ago where we used a similear method to generate a random RAW value from a huge number base to use as our PKs. Using a RAW() for lookups and joins worked very well for us. The guranteed unique value provided by SYS_GUILD looks promising.
    If you don't like raws another possiblity will be klunky and inefficient.
    1. Generate a random number using DBMS_RANDOM with a huge number base
    2. Check to see if the number has been used. If so return to step 1 until a unique number is generated
    Using a sequence is better than this in everey way I can think of.
    Edited by: riedelme on Mar 1, 2013 7:08 AM

  • Best way to create a Contact Us form

    What is the best way to create a contact us form?
    I created mine using a table and the form sleection of DW CS6.
    Thanks!
    Janelle

    Creating the form itself is really only half the job.
    You can have a marvelous form created using html and DW's built in form items. Those items can be in a table, or not, that part is up to you. The next step is making the form "do something".
    The simplest way to make a form work, is a mailto: link in the form action attribute, but it's the absolute worst way to go. Mailto: links require the viewer to have an email client installed and set up on the computer they're using to submit your form. If they don't (as in the case of Gmail, htomail, yahoo, etc mail users) when they click Submit, absolutely nothing will happen.
    Another drawback of using a mailto: link for your form submission is that email address is now open to every spam email harvester on the internet. If you like certain "blue pill emails" then there wouldn't be an issue, but if you are like the majority of society, you won't be sending funds to any Nigerian doctors either and won't want to be spammed constantly.
    Personally, I use the Formmail script, available for free at http://www.tectite.com for pretty much all of my html forms. As long as your server has PHP installed (most do) the Formmail script will work very well for you. They have a ton of "How To" info on their site and the script itself is very robust with loads of features you can use, or not, at your discretion. They also have a very well documented troubleshooting section and a searchable forum that take care of the most common issues you run into.
    Your next step is "find out what server scripting language you have available on your server". From there, you'll need to find/write a compatible script, then attach your form to it.

  • Which is the best way to create a connection object

    hi,
    Eventhough i am not new to java I just wanted to know that which is the best way for creating sql connection object.
    Is it using the DriverManager.getConnection(..,..,..) or using a datasource and getting the connection.
    Which is more efficient or Is there any other way to create sql connection which is even more better.
    thanks in advance.
    pradeepbhargav

    AFAIK all connections, DataSource ones included are created by calling the DriverManager. A DataSource is a factory for Connection objects (from JavaDocs)
    If you're talking about managing connections then it depends on the application. A DataSource is great for apps that can support many clients or are multi-threaded, but may require a JNDI implementation to get to it.
    If however you have an single threaded app that hits the database in a serial fashion, then DataSource is probably an overkill.
    Dave

  • What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period?

    I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005.
    I need to display the peak number of patients assigned to a medical practice each month for a 12 month period based on the end-user selecting a
    single month and year.
    I've previously created a report that displays all patients assigned to the practice for any single month but I’m looking for advice on how to
    how to produce a resultset that shows the peak number of patients each month for a 12 month period. I thought about creating a query that returns the peak count for each month (based on my previously created report which displays all patients assigned to the
    practice for any single month) and then use a UNION statement to join all 12 months but I'm sure that isn't the most efficient way to do this. The other challenge with this approach (twelve resultsets combined via a UNION) is that the end-user needs to be
    able to select any month and year for the parameter and the report needs to display the 12 month period based on the month selected (the month selected would be the last month of the 12 month period).
    For the report I’ve previously created that displays all patients assigned to the practice for any single month, the WHERE statement filters the
    resultset on two fields:
    Start Date - The date the patient was assigned to the practice. This field is never null or blank.
    End Date - The date the patient left the practice. This field can be null or blank as active patients assigned to the practice do not have an End Date. When the patient
    leaves the practice, the date the patient left is populated in this field.
    Using these two fields I can return all patients assigned to the practice during Nov 2012 by looking for patients that meet the following criteria:
    start date prior to 11/30/2012 (using the last day of the month selected ensures patients added mid-month would be included)
    AND
    end date is null or blank (indicates the patient is active) OR the end date is between 11/1/2012 -11/30/2012 (returns patients that leave during the month
    selected)
    Regarding the query I need to create for the report that displays the peak count each month for 12 months, I'm looking for advice on
    how to count patients for each month the patient is assigned to the practice if the patient has been assigned for several months (which applies to most patients). Examples are:
    John Doe has a start date of 6/01/2012 and an End Date of 10/07/2012
    Sally Doe has a start date of 8/4/2012 and no End Date (the patient is still active)
    Jimmy Doe has a  start of 7/3/2012 and an End Date of 9/2/2012
    Given these examples how would I include John Doe in the peak monthly count each month for May - October, Sally Doe in the peak monthly count for
    August - December and Jimmy Doe in the peak monthly count for July – Sept if the end-user running the report selected December 2012 as the parameter?
    Given the example above and the fact I'm creating a line chart I think the best way to create this report would be a resultset that looks like
    this:
    Patient Name              
    Months Assigned
    John Doe
    June 2012
    John Doe                     
    July012
    John Doe                     
    Aug 2012
    John Doe                     
    Sept 2012
    John Doe
    Oct 2012
    Sally Doe                     
    Aug 2012
    Sally Doe                     
    Sept 2012
    Sally Doe
    Oct 2012
    Sally Doe                     
    Nov 2012
    Sally Doe
    Dec 2012
    Jimmy Doe                  
    July 2012
    Jimmy Doe
    Aug 2012
    Jimmy Doe
    Sept 2012
    From the resultset above I could create another resultset that would count\group on month and year to return the peak count for each month:
    June 2012 - 1
    July 2012 – 2
    Aug 2012 - 3
    Sept 2012 - 3
    Oct 2012 - 2
    Nov 2012 - 1
    Dec 2012 - 1
    The resultset that displays the peak count for each month would be used to create the line chart (month would be the X axis and the count would
    be the y axis).
    Does this sound like the best approach?
    If so, any advice on how to create the resultset that lists each patient and each month they were assigned to the practice would be greatly appreciated.
    I do not have permissions to create SPs or Functions within the database but I can create temp tables.
    I know how to create the peak monthly count query (derived from the query that lists each patient and month assigned) as well as the line chart.
    Any advice or help is greatly appreciated.

    Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
    Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want. 
    Doing a cross  join between my original resultset that had two dates:
    08/27/2010
    10/24/2011
    and a calendar table that has 24 rows (each month for a two year period)
    my new resultset looks like this:
    I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
    You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
    the Months Assigned value must be greater than or equal to the date assigned value.
    Any advice would be appreciated.

  • Best way to create tasks and assign to sharepoint groups

    Hi everyone, I have a custom list which contains newsletter info that is to be seen by around 400 groups (they are stores) and then I need them to mark each list item as 'completed'
    I have been trying to figure out the best way to do this and decided to keep the custom list and somehow link it to a task for each item in the list. We have nintex so was thinking of creating a workflow to create a separate task for each group (store) so
    they can mark it as completed.
    Is this the best way to go about it or am I completely off track?
    Basically all I need is a list which contains around 30 items and around 400 groups (stores) which contain users (store staff) to be able to mark items on the list as completed so it recognises that each store has completed each task.
    Thanks

    Hi  ,
    According to your description, you want to find the best way for creating tasks for 30 list items and assigning the task to around 400 groups.
    For the workflow, it is heavy  that  you need to create around 12000 (30*400) tasks .  In my opinion, the best way is to do with a custom timer job. For more information, you can refer to the
    blog:
    http://www.splessons.com/2013/12/create-a-timer-job-in-sharepoint-2013/
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • Best way to create pop-up menu's

    Hi All,
    I have been having a heck of a time doing something that i
    would have assumed to be relatively simple - specifically creating
    a pup-up menu.
    My first set of approach was to dynamically create a movie
    clip on a button rollover, and within that movieclip create several
    other movie clips that i then assigned actions too. The problem was
    that since i applied a action on "rollout" on the initial movie
    clip, it became a button, and as such all of the sub
    movieclips/buttons became in active (any click was only detected on
    the parent).
    My second set of attempts have been around the MenuComponent
    (see other posts), but here too i have hit problems, initially with
    animation and depth. I solved the animation issue, but the depth
    problem remains.
    Now, i see pop-up menu's everywhere, so i assume that this is
    a relatively simple problem - so what am i missing. A google search
    showed up lots of examples of how to do using menu that are created
    in the UI (rather than purely in AS), using purchased components.
    The first case is not an option since i need to create it fully
    dynamically, the second would be an option - however i typically
    need a far greater level of visual control than off the shelf
    components provide (hence i have needed to build up my own class
    library for many common tasks).
    So after all that, i have a simple question.
    "What is the best way to create a dynamic popup menu in
    AS2?"
    Regards
    Neil

    I guess you want to make your own popup menu, if I understand
    correctly. Nothing simpler, your first attempt was in the right
    direction, you just don't assign button actions to the parent clip,
    because you won't get the child clips to work, but add another
    child at the lowest level inside the parent, that acts as a
    "background" clip/button.
    And for the rollout for the entire popup, you can add a
    transparent clip just under the popup (which is at the currently
    topmost depth) covering the entire stage, give it rollover that
    acts as your rollout, and make it not use the hand currsor, so you
    can't tell it's there.
    That's how I do it, anyways..

  • What is the best way to create business documents in CRM

    Hi All,
    What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
    Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
    Please help.

    Ashim,
    Try looking at the program:
    CRM_TEST_ORDER_MAINTAIN
    I think that should help you figure out the parameters.
    Good luck,
    Stephen

  • Best way to create slide show with last photo having links

    What are some of the best ways to create a slide show (more like a season greeting flash) with the last photo having links and buttons for the viewer to click?
    I already have the code for the slide show. What I need now is how do I reference or point to a keyframe that contains the last slide as the background with buttons and hyperlinks? Perhaps, I also need a way to not showing this slide until the last? How do I do that? This last slide with buttons and links are on it's own layer.
    The other route would be to create the buttons and hyperlinks in the AS3 code instead of design time. If so, how do I do on the last slide?

    What are some of the best ways to create a slide show (more like a season greeting flash) with the last photo having links and buttons for the viewer to click?
    I already have the code for the slide show. What I need now is how do I reference or point to a keyframe that contains the last slide as the background with buttons and hyperlinks? Perhaps, I also need a way to not showing this slide until the last? How do I do that? This last slide with buttons and links are on it's own layer.
    The other route would be to create the buttons and hyperlinks in the AS3 code instead of design time. If so, how do I do on the last slide?

Maybe you are looking for

  • Line Item Data?

    Hi experts,                What is Line Item Data? Can somebody give me an example to understand better the use of Line item data from the reporting prospective? thanks in advance regards, dubbu

  • Order-to-cash flow in SD

    Can you let me know on the Order-to-cash cycle in SD module? The process & steps to set up in SAP. THx, Pri

  • SUBMIT AS FDF DOESN'T WORK IN READER X

    I have a number of pdfs that were created in Acrobat 6.0.  They have submit buttons that permit the data to be e-mailed via a FDF.  All previously worked without difficulty.  Today I updated to Reader X.  I discovered that when completing the pdf in

  • How to fix this warning?.

    Description                                                                                                                                           File Warning 1 Custom tool warning: At least one optional import ServiceDescriptionFormatExtension h

  • SWF not updating

    In Flash Builder 4.7 beta 2 Mac version. When I debug a mobile air application a new swf is not created and placed within bin-debug folder. If the swf is deleted in the bin-debug folder then the following error occurs. Process terminated without esta