Lightswitch html use the 'any' query method

Hi
Can someone please tell me how i can use the "any" query method for entity collections in lightswitch html?
Thanks

Hi Xpert360
It's for a type of EntityCollection this is the code from the msls-2.5.2.vsdoc.js line 2220
any: function any(predicate) {
/// <summary>
/// Determines whether this sequence contains any
/// items that optionally satisfy a condition.
/// </summary>
/// <param name="predicate" type="Function" optional="true">
/// A function to test each item for a condition.
/// <br/>Signature: Boolean item.predicate(item)
/// </param>
/// <returns type="Boolean">
/// True if this sequence contains any items that
/// satisfy the condition, if any; otherwise, false.
/// </returns>
var result = false;
this.each(function (item) {
if (!predicate || predicate.call(item, item)) {
result = true;
return false;
return true;
return result;
Check it out and let me know if you know how to use it, my problem is how to use the call back function.
Thanks

Similar Messages

  • How to know if an Infobject is used in any query

    Hi!!!
    can somebody tell me how can i understand  ( by technical name ) if an infoobject is used in any query ...in every mode:
    as a basic infoobject
    or in a structure of query
    or to build a restrected keyfigure
    or to build a rcalculated keyfigure.
    table RSZELTDIR doasn't give this information.
    It refers only to  query, variable, structure or template,..not also to based infoobject ( infoobect without any delimitation )
    i can't use the technical name to do this search in RSZELTDIR.
    thank you very much
    Fabio

    Yes, Raj is right just go to the Cube/infoobject and click on where used button will show u list of queries/query elements.
    or u can go to metadatarepository and look for that perticular object - click on it and it will give list of other objects, transfer rules, update rules, queries etc.... In short everything related to that object will be shown there.
    Hope this helps.
    KS

  • I would like to download a production desciption into my website like I have before, but it says I can't use the copy/paster method anymore. Why?

    I have a website - www.pawsitivepamperings.com, and I have been adding products for the last 6 months. I have been using the copy/paste method from my drop shipper. Since the end of last week, it hasn't been working. It has totally stopped my progress! I need help in using this function again - as soon as possible. Can you help me?

    I right click, and Copy from an HTML description from my drop shipper. Then I go to my website and right click to Paste.
    One of two things happens. (1) if it does copy, the text prints over the image; OR (2) I get a message that Firefox does not apply a Cut/Copy/Paste.
    The wording at the bottom of the description box says: Path: table> tbody> tr> td> p> font.
    I was told by my webmaster to eliminate the following but I don't see it on my products page: <table align="center" border="0" cellpadding="1" cellspacing="1" width="100%>.
    When I have been on a 'live chat' with my support team, a couple of them have overridden the issue and I could precede, but I go to the next product to add, the whole process starts again and I cannot proceed.
    Does this make sense?

  • Using the Process.getOutputStream() method

    Hi all,
    i have written a java program that executes System commands and returns output...
    this program works fine if you want to only execute the command and returns output...
    but suppose that the program that you executed waits for you to input something before returning ouput?!!
    i suppose i have to use the Process.getOutputStraem() method in my prog!
    but i don't know how to do that :-(
    can any one help me to refine the prog to handle this case !
    thanks a lot
    here is the code:
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        OutputStream os;
        StreamGobbler(InputStream is, String type)
            this(is, type, null);
        StreamGobbler(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    public class GoodWinRedirect
        public static void main(String args[])
            if (args.length < 1)
                System.out.println("USAGE java GoodWinRedirect <outputfile>");
                System.exit(1);
            try
                FileOutputStream fos = new FileOutputStream(args[0]);
                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec("java jecho 'Hello World'");
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                // any output?
                StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT", fos);
                // kick them off
                errorGobbler.start();
                outputGobbler.start();
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
                fos.flush();
                fos.close();       
            } catch (Throwable t)
                t.printStackTrace();
    }

    it's true that i've copied it and pasted it...
    but i do understand how it works (really)
    the article mentioned at last that we could send input
    to the Program by invoking getoutputStream
    i guess that we should write a construtor for the
    streamGobbler class but this time using a
    OutputStreamReader and may be doing sth elseThe "Gobbler" is there to eat up whatever bytes become available on an InputStream (from the program's output). I don't think ou just want to try to use the same class to handle the program's input.
    The Gobbler can be used for eating up whatever comes out of any program--it' general, and doesn't rely on any particular output from the program (input to the Gobler). This is not the case for whatever writes to the program's input. You'll need to write what the program expects in the proper order.

  • I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work

    Hi,
    I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work
    (fault number -2147217900)
    I want to search for a value in a ms access table , if it exist i want to update it, if not i want to insert a new row.
    Working with LabView 7.1, database con. toolset.
    Who can HELP?
    Thanks a lot
    Marco

    Hello,
    I think that If exist is not a standar SQL command (I know it exists I think in Oracle and SQL server), MS access doesn't support it, so I think the best way to do it is first make a Select and then either an Update or an insert, sorry...
    Paulo

  • Problem in finding Exact result by using the following Query

    Hello,
    I am finding difficulty in producing the required result by using the following Query in Reports 6i
    (Note: - The query actual output and the required output are as follows: -)
    SELECT
    DISTINCT
    SH.S_HEAD_CODE,
    B.BILL_ID,
    B.SANCTION_DATE,
    E.EMP_NAME,
    E.EMP_DESIGNATION,
    B.TOTAL_BILL,
    NVL((SH.INITIAL_ALLOCATION-B.TOTAL_BILL), 0) BALANCE
    FROM BILL B, PARAMETERS P,SUB_HEAD SH, EMPLOYEES E, BILL_DETAIL BD
    WHERE
    SH.S_HEAD_CODE=B.S_HEAD_CODE
    AND B.S_HEAD_CODE=BD.S_HEAD_CODE
    AND B.EMP_ID_NO=E.EMP_ID_NO
    AND B.BILL_ID=BD.BILL_ID
    The Output of the above query is as follows: -
    Let say we have Total Amount Sanctioned Rs. 15,000,00/-
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853
    Saqib 2131 1497869
    Amir 6802 1493198
    Shafiq 1214 1498786
    Note:- In the above output the above query is subtracting the current balance from Total Sanctioned Amount (Rs. 1500000) each time, but
    it should actually subtract the current bill amount from the previous balance like the below said result.
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853 {Previous Balance - Current Bill Amount (1500000-7147) }........ The previous balance was actual amount Rs. 1500000
    Saqib 2131 1490722 {Previous Balance - Current Bill Amount (1492853 - 2131)}
    Amir 6802 1483920 {Previous Balance - Current Bill Amount (1490722 - 6802)}
    Shafiq 1214 1482706 {Previous Balance - Current Bill Amount (1483920 - 1214)}
    Results Continue...........................
    Please help me to solve this problem.
    Thank you in advance

    just check if this meets your requirements,
    SQL>
    SQL> With t As
      2  (
      3  Select 'Sohail' c1 ,7147 c2 ,1492853 c3 From dual Union All
      4  Select 'Saqib'   ,2131 ,1497869         From dual Union All
      5  Select 'Amir'    ,6802 ,1493198         From dual Union All
      6  Select 'Shafiq' ,1214 ,1498786          From dual
      7  )
      8  Select c1,
      9         c2,
    10         prv_amt - c2 current_amt
    11  From
    12  (
    13  Select c1,
    14         c2,
    15         c3,
    16         lag(c3,1,1500000) over(Order By c3) prv_amt
    17  From t
    18  );
    C1             C2 CURRENT_AMT
    Sohail       7147     1492853
    Amir         6802     1486051
    Saqib        2131     1491067
    Shafiq       1214     1496655
    SQL>

  • I found my old ipod and i forgot the passcode. It doesnt have an home button so i dont know how to put it in recovery mode so i can restore it. Ive been using the assisted touch method. But what should i do to put it in recovery mode

    i found my old ipod and i forgot the passcode. It doesnt have an home button so i dont know how to put it in recovery mode so i can restore it. Ive been using the assisted touch method. But what should i do to put it in recovery mode so i can restore it.

    Use this program to place the iPod in recovery mode
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • [svn] 3520: Add ability to use the FP10 unloadAndStop() method in SWFLoader .

    Revision: 3520
    Author: [email protected]
    Date: 2008-10-08 10:26:39 -0700 (Wed, 08 Oct 2008)
    Log Message:
    Add ability to use the FP10 unloadAndStop() method in SWFLoader.
    An application needs to be compiled with the "-target-player=10" argument to allow SWFLoader's unloadAndStop() function to use the Flash Player's unloadAndStop() function. If the argument is not provided then the Flash Player unload() function will be called instead.
    QE: YES
    Doc: YES
    Checkintests: YES
    Reviewer: Ely, Deepa
    Bugs: SDK-16764
    SWFLoader.as
    Added new public method unloadAndStop().
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16764
    Modified Paths:
    flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/SWFLoader.as

    Thank you for your replies.
    I have been looking into it as well and seem to have found quite a simple solution...
    First you need to create an instance of a UIScrollView in the .h file:
    IBOutlet UIScrollView *scrollView;
    Then in the .m file, add the following line of code in the viewDidLoad method:
    scrollView.contentSize = CGSizeMake(320, 700);
    Then in IB all you need to do is set the files owner to the controller file we have set up above, drag a new instance of UIScrollView to the window. Then set two of its referencing objects to the File's Owner (view and the scrollView we have defined).
    You can then add as many labels etc to the scroll view by dragging in IB. Load it all up and the view scrolls perfectly and displays all labels!
    Thanks for helping me look into this.

  • How to get the tag of the User Defined Variables using the Get Tag method%3F

    For the cRIO modules under a cRIO Chasis, a tag value can be obtained using the Get Tag method with crio.Type to the TagName input of the method. When it comes to the User Defined Variables, what should be fed to the TagName input?

    For the cRIO modules under a cRIO Chasis, a tag value can be obtained using the Get Tag method with crio.Type to the TagName input of the method. When it comes to the User Defined Variables, what should be fed to the TagName input?

  • Creating multiple tab reports using the same query in Web intelligence

    Hi All,
    I have created a Universe on a BW Query which has fields as below
    AGE  Depaatment  Gender  Grade
    25       FIN                M            A
    27       LES               F            A+
    60       SWS            M             A++
    Based on this data i have created a WEbi report which shows all of these data under one tab.
    Now i create a new report tab in the same Webi Document by right cliicking the existing report and going to inset report and saving it.
    Similarly i create two more new report tabs.
    in each of these tabs i want to show data only for the concened departments.ie =1st report contains all the departments.
    2nd report contains only finance data, third contains only Les data  and fourth only SWs Data.
    Is it possible to create this report using the same query?
    Regards,
    Raj.

    You should use report filters, not query filters.
    A query filter will affect the entire document. Every report tab that pulls data from that query will be impacted. If you start with a single report, by default it shows the data from the query. If you duplicate that report tab, then it's still attached to the first query. There are various ways to create report filters (input controls, quick filter, invoking the filter area from the toolbar) and a report filter impacts only blocks on that report tab. You can even create block filters by clicking on the block first, then creating your filter.
    This is a fairly confusing bit for folks that are new to Web Intelligence.

  • How to use the VBS MoveFolder methode in DIAdem without any error message?

    Hi,
    I want to move folders with the VBS MoveFolder methode, but in DIAdem I run in problems. When I use the following comman    fso.MoveFolder(project_folder & test_folder, project_folder & test_folder & "\" & test_ & " " & test_count) 
    I get error message
    "During call a sub routine no parentheses are allowed!"
    When I remove the brackets and use    fso.MoveFolder project_folder & test_folder, project_folder & test_folder & "\" & test_ & " " & test_count 
    I get the error message
    "Invalid sub routine call."
    How I have to use the command right?
    (the text of error messages is free translated from German Version of DIAdem 11.0! Take only the sense, not the exact wording!)
    Thanks for help.
    Regards
    Sven

    Hello Sven!
    Just add a 'Call' at the beginning of your first line will solve the syntatic error. I recommend always to use 'Call' and parenthesis.
    But there is a fundamental problem in your code: MoveFolder moves a folder from a source to a new destination and the old source folder will be deleted. You try to move a folder to a location below the same folder. If the MoveFolder wouldn't recognize these situtation and throws an error all of your data would be deleted!
    Just print out your paths in a Messagebox to clearify the situation.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Lightswitch HTML Sharepoint App: Access Control Methods

    I have a Lightswitch HTML SharePoint App. Which is working well.
    I have implemented user access security on the entities using SharePoint groups.
    partial void UserAccessGroups_CanUpdate(ref bool result)
    result = false;
    var clientContext = Application.SharePoint.GetHostWebClientContext();
    Microsoft.SharePoint.Client.Web web = clientContext.Web;
    Microsoft.SharePoint.Client.GroupCollection UserGroups = web.CurrentUser.Groups;
    clientContext.Load<Microsoft.SharePoint.Client.GroupCollection>(UserGroups);
    clientContext.ExecuteQuery();
    foreach (var item in UserGroups)
    var permission = "UserAccessGroupAdmin";
    if (item.Title == permission)
    result = true;
    break;
    This works fine when I am debugging the application and it is running on localhost.
    However when I publish theapp and it is running in an Azure site it doesn't work and I am un able to edit the entitiy.
    I have set up the SharePoint Group on the site that is running the appp and assigned the user to the group.
    Has anyone else had a similar experience or have any suggestions.
    Thank you,
    Andrew

    This may help:
    An End-To-End LightSwitch SharePoint Workflow Application
    I have SharePoint permissions in that example and I tested it in production and it definitely works.
    bool isMemberOfVacationApprovers = false;
    var clientContext = this.Application.SharePoint.GetHostWebClientContext();
    //Load the properties for the web object.
    Microsoft.SharePoint.Client.Web web = clientContext.Web;
    // Get the current web
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    // Groups for current User
    Microsoft.SharePoint.Client.GroupCollection UserGroups = web.CurrentUser.Groups;
    clientContext.Load<Microsoft.SharePoint.Client.GroupCollection>(UserGroups);
    clientContext.ExecuteQuery();
    foreach (var item in UserGroups)
    if (item.Title == "Vacation Approvers")
    isMemberOfVacationApprovers = true;
    if (!isMemberOfVacationApprovers)
    results.AddEntityError
    ("Only members of Vacation Approvers can edit this record.");
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Using the Tag Query's Statistics Mode

    I've tried to come up with the average of tag values over a span of a month two different ways:
    1.  using the Statistics mode
    2.  using the HistoryEvent mode and averaging the resultant data with an average function.
    For most tags the two results are quite similar.  I have one tag however that contains a lot of zero values and for that tag, the Statistics mode average is about 10% higher than the HistoryEvent mode average. It's like the Statistics mode ignores the zero values when doing it's calculations.
    Is this correct?  My tag query is returning data from six tags - does this cause the Statistics mode any heartache?
    David Macindoe

    David,
    Martin K - if you are listening please feel free to correct or confirm the following:
    The PI UDS uses native Statistical method calls to the PI API/SDK, so the results are coming directly from PI.  In this case, xMII is not doing a HistoryEvent call and then doing the average calcs on the raw event records, like it would be if you did it in BLS.
    Regards,
    Jeremy

  • HT3986 Hi, i have a macbook pro version 10.6.8 with boot camp version 3.0.4. I managed to install windows 7 professional x64, however when i insert my OS CD to install the drivers using the boot camp method, it says unsupported to this computer model

    Hi, i have a macbook pro version 10.6.8 with boot camp version 3.0.4. I managed to install windows 7 professional x64 bits but however when i tried to install the drivers using the OSX MAC CD using boot camp, it prompt me boot camp x 64 is unsupported with this computer model. Then i tried the method by right click the bootcamp x64 and managed to install the drivers. However, i still couldnt manage access the internet and it prompts me no networking hardware detected...Any idea how can i solve it?
    P.S i tried updating my bootcamp version 3.0.4 in mac os with bootcamp x64 version 3.1 exe but it shows me weird wording..
    my bootcamp version in windows 7 is 2.1..

    Uninstall 2.x totally
    Use CCleaner Registry tool
    Do whatever you need to to nuke the existing Apple programs and folders hidden here and there also.
    BC 2.2 was XP and Vista only

  • Removing power lines using the Stroke path method

    I watched a video created by Adobe Product Manager Brian O. Hughes titled Adobe Max:  Hidden Gems in Photoshop an excellent video (see link below).  I have been trying his easy method of removing power lines from an image using the pen tool and stroke path method defined as follows:
    Using the pen tool create a path of the line to be removed.  Making sure the brush tool is small and set at 100% opacity;  click on the Spot Healing Brush making sure it is set to "content aware".  Then in the path panel click "stroke path" and it removes the line.
    Well I have followed these instructions several times, very simple, but it doesn't remove the line for me.  I can manually shift click the start and ending point and it removes it but using the stroke command within the path panel doesn't work.  I am making sure the path is active.
    Any ideas why it doesn't work for me?
    Thanks...........Ralph
    Here is the link to the video, his technique is listed near the end, @ minute 56:  http://www.youtube.com/user/Photoshop

    Hi jjMack, thanks for your response.  I found my problem after realizing that I hadn't terminated my pen line.  I didn't realize I had to click the end anchor point to complete the line,  I thought since the line was obvious on the image that it had been created and  thought I couldn't see it in the paths panel because it was so small (these old eyes aren't what they used to be).  When clicking on the last anchor point it could easily be seen on the paths panel..  I just don't use the pen tool enough so I didn't realize my error.  Learn something everyday.  Incidentally, I had set the stroke path on the paths panel to Spot Healing Brush and only used the tools menu to confirm that content aware was selected.
    Thanks again JJ................Ralph

Maybe you are looking for

  • Need help , plzz

    hi all, i have program that should print like this: System.out.println((Month)+" is a "+(Season[i])+" month with "+(Days[32]));      Prints: January is a winter season with 31 days. Code: public class Exercise3      public static void main(String[] a

  • [Oracle 11g] Store filename as VARCHAR2 and its content as XMLType

    Hi all, The version of Oracle used is 11.2.0.3.0. I would like to load a XML file into a table from AIX with a Shell script. Here is the test case table: ALTER  TABLE mytable DROP PRIMARY KEY CASCADE; DROP   TABLE mytable CASCADE CONSTRAINTS; CREATE

  • Error while getting xml document  with default connection in 8iJServer

    I had used GZIP utility to zip and store the document in the CLOB. If i use thin drivers and GZIP to retieve this document it works fine. instead of thin drivers if i use oracle8iJserver defalut connection i get the follwing error :Error while gettin

  • LabVIEW Programming

    I would like to know how to specify the position of more than one cursor in an XY graph programmatically. Is there a propoerty node that can select each cursor in a graph based on their name?? Thank you

  • Collaboration Room - Null Link

    Hi all, Ive created a new room template. First, I create a new workset and save it inside com.sap.ip.collaboration -> worksets All the iviews and pages of that workset are inside com.sap.ip.collaboration -> TemplateAndPartContent -> Generic After tha