How can I compare single value with multiple value...

Hello,
I want to compare one value with multiple values, how can it possible ?
Here in attachment I tried to design same logic but I got problem that when I entered value in y that is compared with only minimum value of x, I don't want that I want to compare y value with all the x value and then if y is less then x while loop should be stop.
I want to do so because in my program some time I didn't get result what I want, for example x values is 4,5,6,7,8  and y value is  suppose 6 then while loop should be stop but here it consider only minimum number and its 4 here so while loop is not stop even y is less then 7 and 8. So I want to compare y value with all the entered values of x and if y is less then any of x values then while loop should be stop and led should be ON.
Please guide me how can I do so.....
Solved!
Go to Solution.
Attachments:
COMPARISON.vi ‏8 KB

AnkitRamani wrote:
Thank you very mach for your help..
may be i have solved this ....i have made one change in my vi that instead of min. i select max and max. value is compare with the value of y and then if y is less then the max. while loop will be stop other wise its run continuously.
this is working fine...
any ways thanks again for your help and time...
I have to agree with Lewis - his way is more efficient.
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Similar Messages

  • How can I create a hashmap() with multiple values for the same key?

    I am trying to write an application that will us something like a Map() with multiple values but some have the same key. Is this possible?

    i had the same question. just create a List, add all the values u want to it, and then put the List into the map like u would a normal single value. e.g.
    List list = new ArrayList();
    list.add(value1);
    list.add(value2);
    map.put(key, list);
    i bet u r doing the same course as i am =)

  • How to compare single value with multiple values

    In my query I have something like this:
    A.SOR_CD=B.SOR_CODE where A and B are 2 different tables. This condition is in the where clause. The column in table A has single values but some values in table B have multiple comma separated values (822, 869, 811, ..).  I want to match this single
    value on the left side with each of the comma separated values. Please let me know how will I be able to do it. The number of comma separated values on the right side may vary.

    Hi MadRad123,
    According to your description, you want to compare single value with multiple values in your query. Right?
    In this scenario, the table B has comma separated values, however those comma separated values are concatenated into a string. So we can use charindex() function to return the index of the table A value. And use this index as condition in
    your where clause. See the sample below:
    CREATE TABLE #temp1(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp1 VALUES
    ('1','A'),
    ('2','A'),
    ('3','A'),
    ('4','A'),
    ('5','A')
    CREATE TABLE #temp2(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp2 VALUES
    ('1','a,A'),
    ('2','A,B'),
    ('3','c'),
    ('4','A,C'),
    ('5','d')
    select * from #temp1 a inner join #temp2 b on a.ID=b.ID
    where CHARINDEX(a.Name,b.Name)>0
    The result looks like below:
    Reference:
    CHARINDEX (Transact-SQL)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How can i create  excel sheet with multiple tabs using utl file?

    how can i create excel sheet with multiple tabs using utl file?
    any one help me?

    Jaggy,
    I gave you the most suitable answer on your own thread yesterday
    Re: How to Generating Excel workbook with multiple worksheets

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

    How can I get an album with multiple artists to display in my Nano as one album insteadof multiple albums?

    See this page for helpful information.
    http://samsoft.org.uk/iTunes/grouping.asp
    B-rock

  • How can I restrict a vendor with certain value limit?

    Hi Gururs,
    How can I restrict a vendor with certain value limit?.
    Scenario is like this
    If my company was decided to purchase goods from a particular vendor upto Rs.1000, if cross the rs.1000 limit don't allow the Posting the PO and get the Message as warning/error.
    Give the configuration setting's and T.codes
    Thanks and regards
    G.N.Rao

    Hi
    Go to T.Code oms4 and then select the material status BP (Blocked for purchasing)
    Click on Details
    In that under Purchasing select the option A= Warning or B=Error
    Click on Save
    Thus by doing this no further purchasing function for that material can be done. So the PO can not be issued
    So as and when the value limit reaches see that purchasing option is blocked
    So no further PO are generated in the future
    I hope this helps you out
    If found useful reward accordingly
    Thanks
    pavan

  • How can a calender be synced with multiple apple devices

    how can a calender be synced with multiple apple devices so that all the users can be able to access the calender and also the entries done by one of them?

    Hi Muneshdm,
    Welcome to Apple Support Communities.
    See these articles for information on setting up iCloud on multiple iOS devices, as well as how to share calendars:
    iCloud: Set up iCloud on your devices
    http://support.apple.com/kb/PH2609
    iCloud: Share a calendar with others
    http://support.apple.com/kb/ph2690
    Best,
    Jeremy

  • How can I get a Album with multiple artists to appear as a single album with all of the tracks?

    How can I get a Album that contains multiple artists to appear as a single album with multiple tracks?  Also when I sync iTunes with my iPhone or iPad the Album appears as multiple albums with each artist.  The Album title is the same on each of the affected tracks.

    Quick answer:  Select all the tracks on the album, File > get info, and either give them all a single "album artist" or check the "compilation" flag.
    If these are from multiple-CD sets you may also need to enter the appropriate information in the disc number fields.

  • Can you add People Picker with multiple values to Word Document using Quick Parts?

    Hi all, I've been trying to develop a form in Word that takes a bunch of metadata from the SharePoint library. Most of it works okay, but when I try to add any fields that have been set up to take multiple entries in a people picker, they don't show up
    in the add quick parts list. Any ideas, or is this a limitation?

    Hi NREL,
    According to your description, my understanding is that the people picker column with multiple values was missing in Word Quick Parts.
    This is by design that we are unable to use the fields which is allowed multiple selections.
    As a workaround, you can use a text field(Single line of text) to store the multiple values of the people column. When you create a document, start a workflow to update the text field using the values of the people column, then use the
     text field in Word Quick Parts.
    You can do as the followings:
    Open your library, and create a new column using Single line of text.
    Open your site with SharePoint 2010 Designer, create a workflow based on your library.
    Add the action “Set Field in CurrenItem”, and set it like the screenshot.
    Set the Start Options is “Start workflow automatically when an item is created”.
    Best Regards,
    Wendy
    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]
    Wendy Li
    TechNet Community Support

  • How can I compare the actual and expected values in Unit testing when they are XML files?

    I have created a unit test for a method in VS 2008. My expected value and actual value are XMLs. Therefore though the output is same as I expect it gives an error as I am doing string comparison now. How can I compare these 2 XMLs in expected output and
    actual output format in Unit Testing?
    mayooran99

    In unit test, when you want to validate XML files, you feed them into the class / struct that you want to feed the XML into and compare the values there (You don't just feed it in XMLReader and feed it line by line, right? But if it really is, that's how
    you should also test it in unit tests).
    In short, how you'd use the XML in your code, that's how you should test it in unit test.

  • How can you develop photo galleries with multiple pages using the web module?

    Going through the web module I can see there are many options for developing a web page with a single collection of photos.  How can you develop a web site with multiple pages containing different categories of photos using the Lightroom web module?

    This thread will give you several ideas.
    Re: How do you embed a gallery into an existing website?

  • How to make a single image with multiple clickable points?

    Hi,
    I just started using CS4 yesterday, but am pretty confused. I managed my first little achievement with it, but am havign troubles. I'm not even sure of the capabilities of the software to be honest, but I would like to know if I can have a single image, then have sections of it which can be hovered over with a tag and a link to another part of my site. Is this something that can be done?
    Thanks!

    Hi,
    to reach several different links on the image you need to create so-called hotspot (I had to translate the following terms from my German Dreamweaver). How to do?
    Click into the image
    Open properties window
    Open list box orientation.
    Surround the image parts in question (look at the green arrow). Feel free/play with chosen forms.
    Hans-G.
    P.S.
    You shouldn't use only images on your site.

  • How can I rearrange IMAP folders with multiple accounts in Mail?

    Hi all,
    I switched to the Mac in 2004, but I've never really used Mail (been using Entourage). I set up an IMAP account in Mail, and was very impressed. So I decided to set up my other IMAP account, too. Now things are a bit messed up. I have these folders
    Inbox
    Drafts
    Sent
    Junk
    Trash
    Email1
    Email2
    Under Email1 and Email2 are all the IMAP folders for the respective email address, except Inbox, Drafts, Sent, Junk and Trash are separate, and each of those folders has a folder in it called Email1 and one called Email2. How can I change this so that I just ahve the Email1 and Email2 folders, and everything appears under those?
    On a less important note, is there any way to make Mail ignore IMAP folders? My email server creates a folder called '.mailboxes' for each IMAP account, and just stores some of its information in there, nothing I want in Mail. So is there a way I can hide this .mailboxes folder?
    Thanks in advance

    Hi mr max pie whatever.
    This is actually one of Mail’s best features and cannot be changed.
    Instead of grouping mailboxes by account, Mail groups them by purpose first (and uses the account name to differentiate the individual mailboxes associated with each account), then groups by account the remaining mailboxes that don’t belong to any of the standard groups.
    This has the advantage of letting you choose at any time, and independently for each mailbox type, whether you want to look at your Inbox, Sent, Trash, etc. mailboxes as if you had just one of them shared by all accounts (i.e. an aggregate), or look at each of the corresponding individual mailboxes separately.
    As to the “.mailboxes” folder that you’d rather not see there, I believe Mail shouldn’t show it if the name begins with a period. Moreover, I’ve troubleshooted a few cases where the problem was the opposite, i.e. the user had renamed a mailbox with a leading period and it became inaccessible as a result. I don’t know why Mail behaves so inconsistently in this regard. If all the server-stored mailboxes were subfolders of a parent folder, you could solve the problem by typing the name of the parent folder in Preferences > Accounts > Advanced > IMAP Path Prefix...

Maybe you are looking for