How to know the progress of the Sync when I call PullAsync()

Hi,
I am developing a Windows 8.1 app, In that I am using offline data concept using Azure mobile services with JavaScript Backend.
My questions is how can I show the status or progress of the Sync When I call PullAsync() method.... I want to show the number of records sync or how much percentage synced like that...
private async void ButtonPull_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
await todoTable.PullAsync();
//How to know the progress of sync
await RefreshTodoItems();

Hi Narendra,
I suggest you to check this information for more details.
PullAsync() call can either pull all items from the remote table, or just pull a subset of the items. Only pulling some items from the table is often advisable, as stuffing everything from the (potentially large) remote database table into the (restricted by
the device memory) local table may have some bad performance implications. You can pass an OData-formatted query to select which items to pull from the server, or you can also use the (more friendly) Linq expressions to determine the query of items to be pulled.
var localTable = client.GetSyncTable<TodoItem>();
var query = localTable.Where(t => !t.Complete);
await localTable.PullAsync(query);
var localItems =
await localTable
    .Select(i => i.Text)
    .ToListAsync();
AddToDebug("Items from the server (in the local table): {0}",
string.Join(", ",
localItems));
One important thing to notice regarding pull operations – if there are items in the pending synchronization queue, those items are first pushed over to the server, then the pull operation takes place. That prevents a scenario where an update is done to a
local item, but a pull operation would overwrite the changes locally and potentially leave the data in an inconsistent state. That’s one the first synchronization rule: a pull triggers a push. In the example below, the insert operation for the “Buy milk” item
will first be pushed to the server, then the items will be pulled into the local table.
await client.SyncContext.InitializeAsync(store);
AddToDebug("Initialized the sync context");
var localTable = client.GetSyncTable<TodoItem>();
var item =
newTodoItem { Text =
"Buy milk", Complete =
false };
await localTable.InsertAsync(item);
var query = localTable.Where(t => !t.Complete);
await localTable.PullAsync(query);
var localItems =
await localTable
    .Select(i => i.Text)
    .ToListAsync();
AddToDebug("Items from the server (in the local table): {0}",
string.Join(", ",
localItems));
for us to better understand both Push() and pullasync() feature is used while querying from the Database.
http://blogs.msdn.com/b/azuremobile/archive/2014/04/07/deep-dive-on-the-offline-support-in-the-managed-client-sdk.aspx
Girish Prajwal

Similar Messages

  • How to know the dynamic values for this :AND category_id_query IN (1, :3, )

    Hi Team,
    R12 Instance :
    Oracle Installed Base Agent User Responsibility --> Item Instances -->
    Item Instance: Item Instances > View : Item Instance : xxxxx> Contracts : Item Instance : xxxxx> Service Contract: xxxxx>
    In the above page there are two table regions.
    Notes.
    -------------------------------------Table Region---------------------------
    Attachments
    -------------------------------------Table Region---------------------------
    --the attachments are shown using the query from the fnd_lobs and fnd_docs etc...
    I want to know what are the document types are displayed in this page ?
    --We developed a custom program to attach the attachments to the  services contracts and the above seeded OAF page displays those ..as needed.
    But after recent changes..the Attachments--> table region is not showing the attachments.
    I have verified the query..and could not find any clue in that..
    but i need some help if you guys can provide..
    SELECT *
    FROM
    *(SELECT d.DOCUMENT_ID,*
    d.DATATYPE_ID,
    d.DATATYPE_NAME,
    d.DESCRIPTION,
    DECODE(d.FILE_NAME, NULL,
    *(SELECT message_text*
    FROM fnd_new_messages
    WHERE message_name = 'FND_UNDEFINED'
    AND application_id = 0
    AND language_code  = userenv('LANG')
    *), d.FILE_NAME)FileName,*
    d.MEDIA_ID,
    d.CATEGORY_ID,
    d.DM_NODE,
    d.DM_FOLDER_PATH,
    d.DM_TYPE,
    d.DM_DOCUMENT_ID,
    d.DM_VERSION_NUMBER,
    ad.ATTACHED_DOCUMENT_ID,
    ad.ENTITY_NAME,
    ad.PK1_VALUE,
    ad.PK2_VALUE,
    ad.PK3_VALUE,
    ad.PK4_VALUE,
    ad.PK5_VALUE,
    d.usage_type,
    d.security_type,
    d.security_id,
    ad.category_id attachment_catgeory_id,
    ad.status,
    d.storage_type,
    d.image_type,
    d.START_DATE_ACTIVE,
    d.END_DATE_ACTIVE,
    d.REQUEST_ID,
    d.PROGRAM_APPLICATION_ID,
    d.PROGRAM_ID,
    d.category_description,
    d.publish_flag,
    DECODE(ad.category_id, NULL, d.category_id, ad.category_id) category_id_query,
    d.URL,
    d.TITLE
    FROM FND_DOCUMENTS_VL d,
    FND_ATTACHED_DOCUMENTS ad
    WHERE d.DOCUMENT_ID = ad.DOCUMENT_ID
    *) QRSLT*
    WHERE ((entity_name    ='OKC_K_HEADERS_V'-- :1
    AND pk1_value          IN ( 600144,599046) --:2
    AND category_id_query IN (1, :3, :4, :5, :6, :7) )
    AND datatype_id       IN (6,2,1,5)
    AND (SECURITY_TYPE     =4
    OR PUBLISH_FLAG        ='Y')))
    --='000180931' -- 'ADP118'
    The above seeded query is the one which is used for table region to retrieve the data..
    how to know the dynamic values for this : AND category_id_query IN (1, :3, :4, :5, :6, :7) )
    --Sridhar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Patricia,
    is it working for restricted key figure and calculated key figure ??
    Note Number Fisc Period Opening Days
    1 1 2
    2 1 3
    3 1 0
    because I have other restriction, so I create two restricted key figure..
    RK1  with restriction :  Total Number of Note,
    RK2  with restriction :  Total Opening Days ,
    then I Created a calculated key figure, average opening days in a period
    CK1 = RK2 / RK1..
    in this case, I am not sure if it will work or not..
    for example, during RK2 calclation, it might be this   2+3 = 5, the line with 0 will be ignored..
    during RK1 calcualtion, it might be 1 + 1 + 1 = 3. ---> Not sure in this case, the line with opening days 0 will be calculated or not..
    could you please confirm..

  • With a contract number, how to know the total PO release value against it?

    Usually one contract corresponds to multiple PO records, now we know the contract number, then how to know the total PO release value against this contract.  In other word, we would like to know the total release value of all the POs with the same contract number.  To just input the contract number in EKPO table? but then look for which field in this table to add these PO release values up?
    We will give you reward points!
    Thanks!

    hi Mohammad,
    By following your instruction, input the contract number 4800000112 into Document number field, then hit Enter, get the following (only copy two records here for example), but kind of a mess.  Could you let us know which one is the PO release value for this contract?
    Contract   Type Vendor     Name                                 PGp Agmt. date
      Item  Material           Short text                               Mat. group
      D I A Plnt SLoc                 Targ.qty. Un       Net price  Curr.   per Un
    4800000112 WK   2000012012 GULF INTERSTATE FIELD SERVICES       QBH 06/20/2006
    Agreement start06/20/2006 Agreement end 12/31/2007
    Tgt. val.        1,000,000.00  USD   Open          1,000,000.00 USD   100.00 %
      00001                    Inspection Svcs, Construction            R3VNI
      L   U                                  0  UL            0.00  USD       1 EA
      00002                    Chief Inspector                          R3VNI
      L   U                                  0  DAY         390.00  USD       1 DAY

  • How to know the balance and validity of internet data in iPad

    How to know the balance and validity of internet data in iPad?

    Sir I m using internet in ipad4 with airtel network
    They provide me 2gb data with the amount of 255 rupees
    And now I inserted the sim in my ipad4
    And start the surfing on safari n all
    And now I wanted to know how much data is balance.

  • How can I watch movies in germany with native tone, english? Any one knows how to switch the language when renting a movie?

    How can I watch movies in germany with native tone, english? Any one knows how to switch the language when renting a movie?

    I wonder the Format Tables macros on my site could be adapted?
    http://www.grainge.org/pages/authoring/word/word_macros.htm
    If not, I have used Macro Express to format tables in Rh. No reason it could not be used in Word.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to know the class method behind an enterprise service

    Hi,
    SAP has provided enterprise services for Room booking in Real Estate module. They are even shipping the complete application for a nominal price. But the standard version is not suitable for our client requirement so they want to develop this application inhouse.
    Now my question is:  I know the enterprise services used in this application. How to know the implementing methods behind these enterprise services ?
    If possible suggest which approach will be a better option for the inhouse development.
    1. Webdynpro ABAP and use directly methods behind the enterprise services.
    2. Webdynpro ABAP and create client proxy class for the enterprise services.
    3. Webdynpro JAVA and use the enterprise services.
    4. Using visual composer modelling the application.
    Please suggest the best alternative.
    Best Regards,
    Aleem Mohiuddin.

    Hi
    They are even shipping the complete application for a nominal price. But the standard version is not suitable for our client requirement so they want to develop this application inhouse.
    I assume you are talking about xApps.
    How to know the implementing methods behind these enterprise services ?
    In sproxy transaction you can search service and then you can see class and method implemented behind that particular service.
    1. Webdynpro ABAP and use directly methods behind the enterprise services.
    In my opinion not recommended to bypass ES and use method behind it.
    2. Webdynpro ABAP and create client proxy class for the enterprise services.
    Not sure why you want to create proxy of ES.
    3. Webdynpro JAVA and use the enterprise services.
    4. Using visual composer modelling the application.
    You can use either Webdynpro (ABAP or Java) or VC to model your application which consume ES in backend. Both options are good, you can chose Java or ABAP flavor of dynpro based on skill available in team. VC is very effective in rapid modelling and can be used in protyping or in development of complete application.
    Regards,
    Gourav

  • How to know the error in the goods movement

    Hai gurus,
    a) while doing goods issue and goods receipt , if there is any
        error  in the goods movement how to know the same and correct it.
    Regards,
    sekar chand

    Hi,
    If You are doing GR and GI during order confirmation then you will find a tab for Display Error(Bell Ikon).At the time of any error you will find this icon highlighted.press it you will find details error description and proposed solution.
    Regards,
    Dhaval

  • How to know the PO  Created with RFQ or Not..??

    Hi MM Gurus,
    How to know the purchase order created with one quotation or not. because when i am trying to create PO with /ME21N through DOcumen Overview on. there is list of Quotation. i created PO with XYZ quotation. and after creation of PO i am trying to create another PO with another quotation but in that list still XYZ quotation is Displying. so how to knows once PO cretd with Quotation or not. . and I dont wanted to disply quotation once created Po.
    Thanks in Advance.
    N.A.Reddy

    Hi Pradeep. Thanks for the mail.
    the problem is ....with *quotation...*
    How to know the purchase order created with one quotation or not.
    because when i am trying to create PO with /ME21N through DOcumen Overview on. there is list of Quotation.
    I created PO with XYZ quotation. and after creation of PO i am trying to create another PO with another quotation but in that list still XYZ quotation is Displying.
    so how to knows once PO cretd with Quotation or not. .
    and I dont wanted to disply quotation once created Po.
    Thanks in Advance.
    N.A.Reddy

  • How to know the count of record in CR XI?

    Post Author: Liu ming
    CA Forum: Deployment
    Hi All,
    I create a report by CR XI release 2. The report is viewed in ASP.Net. So, I would like show a message when the report have no record. My question is how to know the count of record?
    Thanks.

    I was able to do this by using
    ora:countNodes('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500')

  • HT204088 How to know the rest of money in a credit card and the total of purchase amount?

    How to know the rest of money in a credit card and the total of purchase amount?

    What do you mean 'the rest of money in a credit card' ? All you can see on your purchase history is what you've bought, you can't see how things were billed nor the total amount that you've spent in the store - you will need to sum your purchases yourself to see the total.

  • How to know the timings of the run time of thr report

    Hi,
    Can you please tell me how to know the run time of the query , i mean how much time it took for the query to dispaly the results .
    Also we have these queries in the workbook. How to refresh the work book . is it enough if i refresh the query.
    Thanks
    Sruthi

    Hi
    How can we check in RSRT tcode?
    And how can we do i RSRTRACE?
    Can  I know the procedure.

  • How to know the amount of ora 11g page-out  memory (sga and pga)?

    How to know the amount of oracle 11g page-out memory ( sga and pga) in the SunSolaris 10 Unix and Linux.
    I need to know how many oracle memory are being page-out ( all and for a one oracle server process).
    thanks

    You can monitor the paging with vmstat or sar commands.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32009/tuning.htm#sthref500
    You can also get the paging information on OEM home page if configured for your database.
    But I don't know if there exists a method with which one can find out how much memory per session/server process is getting paged out.

  • How to know the total page number of the standard report

    How to know the total page number of the standard report?
    If I insert a graph, a table, or text into the end of the standard report, how to know how much space is left for the current page?

    Hello Net,
    Unfortunately, we do not have any VIs in LabVIEW that can figure out the number of pages of a standard report. However, with the use of ActiveX calls you can achieve this task. Here are a couple of discussion forums which discuss this:
    Excel Page Numbering with ActiveX:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=194479&requireLogin=False
    Number Pages in Word Report:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=162972&requireLogin=False
    There is also great documentation on using ActiveX on msdn. You can search this document for page number objects. Here is a link to this:
     http://msdn2.microsoft.com/en-us/library/aa223048(​office.11).aspx
    Please refer to these links. If you still have questions please feel free to let us know so we can assist you.
    Thank you
    Best Regards,
    Dominic L.

  • How to know the run time of a program..?

    Hi Gurus,
    How to know the exact run time of a program....?
    Suppose i've a program....I've changed the code to improve the performance.
    Now i want to compare run time of older and new one...How to do this...?
    Pls help me ....
    Thanks and Regards,
    Nagarjuna

    Hi,
    go thru the below mentioned code............
    data:   start TYPE i,
              end TYPE i,
              dif TYPE i.
    GET RUN TIME FIELD start.
    SELECT SINGLE bukrs belnr gjahr blart budat
    FROM bkpf
    INTO (cc, doc, fy, doc_ty, pst_dt)
    WHERE bukrs = p_bukrs
    AND belnr = p_belnr
    AND gjahr = p_gjahr.
    GET RUN TIME FIELD end.
    dif = end - start.
    WRITE: /001 'Time for select',
    067 ':', dif, 'microseconds'.
    Reward all helpful answers.
    Thanks

  • How to know the size of a DATABASE ?

    Guys,
    How to know the size of a DB ?
    Also
    How to know the size of a TABLE ?
    How to get the content of a procedure/view/trigger ?
    Inputs are welcome !

    How to know the size of a DB ?If you want to know the physical size, query dba_data_files + dba_temp_files. if you need to know the actual consumed space in those files, compute sum of bytes from DBA_SEGMENTS.
    How to know the size of a TABLE ?Query all/dba/user_segments.
    How to get the content of a procedure/view/trigger ?all/dba/user_source, all/dba/user_views, all/dba/user_triggers.
    Message was edited by:
    Satish Kandi

Maybe you are looking for