Problem Refreshing list items after updating DBs with a Service

This forum contains topics that were moved from Get Satisfaction
Humberto
Posts: 0
Joined: Tue Jun 02, 2015 6:40 pm

Problem Refreshing list items after updating DBs with a Service

Post by Humberto »

I have several list with Items filled with a Service APIs to and external database. When an Update is made on the DB and I reload the list thru the Service changes do not refresh on the list. To work I have to close and open the panel containing the list twice.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Problem Refreshing list items after updating DBs with a Service

Post by Serhii Kulibaba »

Hello,

Could you clarify what have you tried and what exactly does not work? Do you want to refresh all the list?

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

Problem Refreshing list items after updating DBs with a Service

Post by umama fakher »

f

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

Problem Refreshing list items after updating DBs with a Service

Post by umama fakher »

I think you are saying that after taking DB service it doesn't update what you do afterwards in the database.

I was also having same problem what I did was in Data base I check ON the query then the db service setting in test tab I tested it then import responses then all the new fields which you have updated or created will show up in your Mapping or services.

Hope this will help. Thanks.

Image

Image

Image

Humberto
Posts: 0
Joined: Tue Jun 02, 2015 6:40 pm

Problem Refreshing list items after updating DBs with a Service

Post by Humberto »

Hi Sergiy,
Yes i would like to refresh the whole list. This is part of what I am doing:
I load a list with values returned from a service. Then by pressing the edit button I update the values using another Service and then I call the Service again to reload the new values to the List. Even though the changes are made succesfully I have to close and open the panel containing the List box at least twice to see the updated values. something like:

Code: Select all

 if (Apperyio('EditingPopGridMainInput1').val()!=localStorage.par10){ 

Apperyio.storage.par10.set(Apperyio('EditingPopGridMainInput1').val());
}
if (Apperyio('EditingPopGridMainInput2').val()!=localStorage.par08){
Apperyio.storage.par08.set(Apperyio('EditingPopGridMainInput2').val());
}
//This Updates the new values
UpdatePhoneNumber.execute({});

//This reloads the list
GetMultifacilNumber.execute({});
}
}

Here are some screen shots:
a href="https://d2r1vs3d9006ap.cloudfront.net/s ... 1433344960[/img] /a a href="https://d2r1vs3d9006ap.cloudfront.net/s ... 1433344979[/img] /a a href="https://d2r1vs3d9006ap.cloudfront.net/s ... 1433344996[/img] /a

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Problem Refreshing list items after updating DBs with a Service

Post by Yurii Orishchuk »

Hi Humberto,

Thanks for these details.

So the culprit of the problem you have is a simultaneously invoking services(update and list).

The solutino is:

  1. Comment this line of your code:

    pre

    //GetMultifacilNumber.execute({});

    /pre

  2. Open your page and navigate to "data" tab. Then find "UpdatePhoneNumber" datasource.

  3. Add new "success" event handler with following JS code:

    pre

    GetMultifacilNumber.execute({});

    /pre

    Regards.

Humberto
Posts: 0
Joined: Tue Jun 02, 2015 6:40 pm

Problem Refreshing list items after updating DBs with a Service

Post by Humberto »

Thanks Yurii:
That did the job....

Post Reply