How to pass a function with the same argument multiple times and return values in variables?

The problem I have is I created a function which really is some kind of database.  Basically a bunch of:
if (a.value == "this number"){
b.value = "this expression";
Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.
var a = this.getField("OPE003.EVEN.1.MIP");
Mip(a);
var result1 = Mip();
I tried to overwriting *a* to process the second field
a = this.getField("OPE003.EVEN.2.MIP");
Mip(a);
var result2 = Mip();
result1 and result2 are put in an array, joined as a string.
Doing so, I always get the last processing twice as the final result.
Can I use a function as a batch processing tool that way?

You are right, I changed the code to what you said but how do I pass another value through my fonction so I can get Result1 and Result2?
is it
var a = this.getField("OPE003.EVEN.1.MIP");
var b = this.getField("OPE003.EVEN.2.MIP");
var result1 = Mip(a);
var result2 = Mip(b);
var c = new Array[result1, result2]

Similar Messages

  • Itunes has made the same charge multiple times and now has drained my bank account, who can i contact to get my $500 back?!

    i owe apple $30.48 but in the past 45 min itunes has made that charge multiple times to my account and now my bank account has dropped to a mere 6 cents. who can i contact to resolve this issue!

    We are all users here like you. You are not addressing Apple. Please navigate to the Contact Us link at the bottom of this page and contact Apple.
    Hope that helps

  • HT5622 I own three Apple devices, but my iPad remained associated with my old email address and password. How can I register it with the same new email and password?

    I own three Apple devices, but my iPad remained associated with my old email address and password. How can I register it with the same new email and password?

    If you updated your existing account then try logging out of it on the iPad by tapping on the id in Settings > Store and then log back in and see if that 'refreshes' the account on the iPad. If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can download updates to its apps.

  • How can I merge folder with the same name so that the content does not replace the other

    How can I merge folder with the same name so that the content does not replace the other?

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. What can I do?

    I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. Some clips are fine in the movie, but most are just black and when I hover over them, it says source clip missing. How to I fix this? Thank You

    I did that too, then I did a migration assistant to a new Mac and ALL of my movies have Source Clip Missing now, even though the original clips are still in the iPhoto Videos.  I can stand to re edit one or two projects, but not ALL.

  • I have a macPro 10.6.8. i have been receiving mail with the same date--March 14 and the same time--8:51am..I cannot correct:who knows the solution?

    I have a macPro 10.6.8. i have been receiving mail with the same date--March 14 and the same time--8:51am..I cannot correct:who knows the solution?
    Thank you.

    You may need to replace the Pram battery.

  • TS3276 how do I get Mail to stop downloading the same email multiple times?

    My mail keeps downloading the same email multiple times.  I've had as many as 10 of the same emial.  How do I stop this?

    Me too - did you ever figure it out?
    You can't even delete from the server in mountain lion.... I did it from my old mac, but it didn't work. I keep having 11,000 new emails that can not even be deleted in blocks!!!
    Was it a gmail account? Mine is, and my other 2 are fine...

  • HT4889 I just transferred data using migration assistant from a macbook prop to a macbook. I am trying to log back into the user that was on the pro but is now on the macbook with the same password as before, and it says my password is incorrect.

    I just transferred data using migration assistant from a macbook pro to a macbook. I am trying to log back into the user that was on the pro but is now on the macbook with the same password as before, and it says my password is incorrect?

    Suggest you try the password for the Macbook, not the previous one.

  • How to automate saving the same image multiple times?

    Hello. I wish to save the same image multiple times in a folder... is there a way to automate this function? I also need the flexibility of determining the starting number in this image sequence. Thanks.

    Good day!
    I would recommend asking for help over at
    Photoshop Scripting
    And going into more detail about what you want to achieve (maybe post a screenshot, diagram, mock-up to illustrate it).
    Regards,
    Pfaffenbichler

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

  • HT1766 Problems with iPad (3rd generation) i had a pop up on my screen saying i hadnt backed up in 4 weeks i hit ok and the pop up wont go away and now another with the same message has appeared and that wont go either, i cant unlock the ipad because of t

    i had a pop up on my screen saying i hadnt backed up in 4 weeks i hit ok and the pop up wont go away and now another with the same message has appeared and that wont go either, i cant unlock the ipad because of these and i dont think it's backing up properly either
    HELP!!

    Have you tried a reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Is it possible to copy the same database multiple times simultaneously?

    This is the setup of my environment.
    I have a 'master' database that contains the full schema plus some pre-populated data such as default settings. When database schema changes are made, they get made to the master database. When a new customer signs up for the service, I make a copy of this
    master database (using SMO) that will now be the database containing all of the customer's information. The database is rather large, and the copy operation can take a couple minutes.
    Everything works fine as expected, unless I try to provision two new customers at the same time. It appears that Azure only allows for one DB copy operation at a time. Is there a way to allow for copying the same database multiple times simultaneously?
    Thanks for you input. I understand that this is likely not the optimal setup, and that there is many better ways of doing this, but I am somewhat heavily invested in the current process and I would like to find out how to make it work if I can.

    BTW, you can do this programatically by using PowerShell (https://msdn.microsoft.com/en-us/library/ee210569.aspx), SqlPackage (http://www.benday.com/2012/12/18/deploy-a-sql-server-database-projects-dacpac-with-sqlpackage-exe/)
    or the SQL Server binaries for .NET (http://www.vijayt.com/Post/Deploying-a-data-tier-application-in-SQL-Azure-programatically)
    Hope this helps.
    Alex

  • Why is Apple TV showing the same computer multiple times for Home Sharing?

    Why is my Apple TV showing the same computer multiple times for Home Sharing? Also have connectivity issues. Sometimes will lose signal.
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    I recently updated to Yosemite and never had this issue before.

    I'm not 100% sure of the ins and outs, but it's some sort of known issue between Yosemite, Airport and wifi. All you can do is wait for a fix and keep restarting your equipment as and when needed, unless you have the ability to connect your Mac via ethernet.

  • Can I gift the same app multiple times to multiple users?

    Can I gift the same app multiple times to multiple users?
    Like, if I wanted to buy iMovie for 3 friends, could I buy the app as a gift 3 times?

    You should be able to gift it multiple times
    Gifting content : http://support.apple.com/kb/HT2736

  • How do you force instances with the same name on the same layer to update?

    Maybe someone can tell me why flash doesn’t redraw
    components’ x,y positions if they have the same instance name
    and are on adjacent frames? (movieclips work fine, just not
    components) If I have a button on frame 1 and a button on frame 2
    both with the same instance name but different locations on the
    stage, frame 2’s button doesn’t show up in the position
    I placed it, it stays at the position of frame 1 but still has the
    properties of frame 2’s button. The label changes and
    everything. If I stick a button on a frame in between and give it a
    different instance name there is no problem. I thought it might be
    the style manager bug
    http://www.gskinner.com/blog/archives/2007/12/cs3_component_b.html
    but it didn’t seem to affect. This happens for textareas too
    and probably all components although I haven’t tried them.
    I’ve tried using drawNow() and validateNow() with no luck
    either
    http://www.adobe.com/devnet/flash/articles/creating_as3_components_pt3_05.html
    Thank you!
    // put this on frame 1 along with a button on the stage with
    instance name: b
    function doit(event) {
    if (currentFrame == 1)
    gotoAndStop(2);
    else
    gotoAndStop(1);
    b.addEventListener(MouseEvent.CLICK, doit);
    stop();
    // put another button on frame 2 along with this code and
    also make it’s instance name: b but move it so it’s not
    in the same x,y coordinates as the button on frame 1
    stop();
    Something possibly related. I have a movieclip on a layer,
    one instance with name “a” on frame 1 and one instance
    with name “a” on frame 2 and it has event listeners
    inside it that update something on the movieclip. Unless I put the
    movieclips on separate layers the event listeners won’t reset
    each frame. (example: a button with a tooltip onmouseover that you
    want to change the text of from frame 1 to frame 2) You’d
    think if they were on separate keyframes at least but no, they need
    to be on separate layers too.
    I want the movieclip to update each frame. Any ideas?

    instances (whether components or not) with the same name may
    or may not be the same instance. it depends upon how they were
    created.
    for example, if you create an instance on frame 1 of your
    main timeline, give it an instance name and then create a keyframe
    on frame 2, the two instances will be the same.
    but if you create an instance on frame 1 of your main
    timeline, give it an instance name and then create a blank keyframe
    on frame2 and create another, what you think is a duplicate,
    instance and give it the same name, it will be a different
    instance.

Maybe you are looking for