how to refresh current screen after popup dates

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

how to refresh current screen after popup dates

Post by swiftinitpvtltd »

I have a query grid which has popup to select different date ranges. Once selected I put those date ranges in LoggedInSystemUser. Now the problem is although grid refreshes the header of the grid and below script does not show new data unless whole page is refreshed which takes user to home screen.
How do I refresh grid header or something on top of query once pop up selects date range?
previously I used VP trick to have 2 panels one with date range and then query in second panel below but that is just workaround for refresh issue. This time I have multiple queries with date selection.

below does not work even if db has new data for dates.
widget.bind("dataBound", function(e) {


$('#daterange').text('<<LoggedInSystemUser.ReportStartDate>> -- <<LoggedInSystemUser.ReportEndDate>>');
console.log('ami');

});
hpl123
Posts: 2596
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: how to refresh current screen after popup dates

Post by hpl123 »

swiftinitpvtltd wrote:I have a query grid which has popup to select different date ranges. Once selected I put those date ranges in LoggedInSystemUser. Now the problem is although grid refreshes the header of the grid and below script does not show new data unless whole page is refreshed which takes user to home screen.
How do I refresh grid header or something on top of query once pop up selects date range?
previously I used VP trick to have 2 panels one with date range and then query in second panel below but that is just workaround for refresh issue. This time I have multiple queries with date selection.

below does not work even if db has new data for dates.
widget.bind("dataBound", function(e) {


$('#daterange').text('<<LoggedInSystemUser.ReportStartDate>> -- <<LoggedInSystemUser.ReportEndDate>>');
console.log('ami');

});
Try using a process to refresh it (auto refresh option).
Henrik (V8 Developer Ed. - Windows)
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: how to refresh current screen after popup dates

Post by swiftinitpvtltd »

Thanks! I have it but it only refreshes grid items and not the grid header or loggedinSystemuser.
Previously I used VP trick to have 2 panels but here I need data in header or something above grid query to get updated with new selected dates selected in popup form(datesBO form)

So basically user sees reportitems query, then he selects "select date range type" button on query header ops and popup opens with different types of date options, once he selects popup closes but now now those new date range values need to some how come on top of query for user to see what he selected in pop up that is the pain point not working. I can use workaround of VP but as I have many queries like this I do not want to do workaround...
hpl123
Posts: 2596
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: how to refresh current screen after popup dates

Post by hpl123 »

swiftinitpvtltd wrote:Thanks! I have it but it only refreshes grid items and not the grid header or loggedinSystemuser.
Previously I used VP trick to have 2 panels but here I need data in header or something above grid query to get updated with new selected dates selected in popup form(datesBO form)

So basically user sees reportitems query, then he selects "select date range type" button on query header ops and popup opens with different types of date options, once he selects popup closes but now now those new date range values need to some how come on top of query for user to see what he selected in pop up that is the pain point not working. I can use workaround of VP but as I have many queries like this I do not want to do workaround...
This is the EXACT same scenario I had i.e I had a query with a header with data I needed to update with refresh (and the "normal" refresh didn´t update it). "Normal" refresh only refresh data/rows in the query but a process refresh, redisplays the entire query i.e this should work and does for me. To be clear, I have a content panel with a query and in that query I have autorefresh via process enabled and the process just does a "DISPLAY NameOfQuery" and that´s it, the entire query is redisplayed and header and data/row are refreshed. Try it again or if it doesn´t work, your scenario is maybe different from mine in terms of how you have configured your VP/content panels etc..
Henrik (V8 Developer Ed. - Windows)
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: how to refresh current screen after popup dates

Post by Jhstephenson »

I had a similar question, but found that doing the refresh based on a process fixed it.

But, I found something else that is driving me crazy...

In my case I am incrementing, or decrementing, a beginning and ending date, and showing records that fall between those dates. I click the 'Increment' button and it adds a week to the Beginning Date and a Week to the Ending Date and then refreshes the query. I show the current Beginning and Ending Dates and they refresh just fine.

The issue is that if I put the Buttons to execute the Increment, Decrement, and Reset in the Panel Toolbar the buttons disappear after clicking on them once.

If I put them on the Top Panel Toolbar or the Right Panel Toolbar they work just fine and stay available all the time.
The problem with putting them in the Top Panel Toolbar is that is creates a separate row for them and takes up some precious screen real estate. The Right Panel Toolbar works too, I just don't like putting things there.

Has anyone run into anything like this?

Thanks,
Jim
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: how to refresh current screen after popup dates

Post by Jaymer »

Jhstephenson wrote: The issue is that if I put the Buttons to execute the Increment, Decrement, and Reset in the Panel Toolbar the buttons disappear after clicking on them once.
can u post a pic of these buttons & fields?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2596
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: how to refresh current screen after popup dates

Post by hpl123 »

Jhstephenson wrote:I had a similar question, but found that doing the refresh based on a process fixed it.

But, I found something else that is driving me crazy...

In my case I am incrementing, or decrementing, a beginning and ending date, and showing records that fall between those dates. I click the 'Increment' button and it adds a week to the Beginning Date and a Week to the Ending Date and then refreshes the query. I show the current Beginning and Ending Dates and they refresh just fine.

The issue is that if I put the Buttons to execute the Increment, Decrement, and Reset in the Panel Toolbar the buttons disappear after clicking on them once.

If I put them on the Top Panel Toolbar or the Right Panel Toolbar they work just fine and stay available all the time.
The problem with putting them in the Top Panel Toolbar is that is creates a separate row for them and takes up some precious screen real estate. The Right Panel Toolbar works too, I just don't like putting things there.

Has anyone run into anything like this?

Thanks,
Jim
Sounds strange and if I understand the problem correctly, I can´t see why this would happen. Yes, some screenshots would help.
Henrik (V8 Developer Ed. - Windows)
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: how to refresh current screen after popup dates

Post by swiftinitpvtltd »

hpl123 wrote:
swiftinitpvtltd wrote:Thanks! I have it but it only refreshes grid items and not the grid header or loggedinSystemuser.
Previously I used VP trick to have 2 panels but here I need data in header or something above grid query to get updated with new selected dates selected in popup form(datesBO form)

So basically user sees reportitems query, then he selects "select date range type" button on query header ops and popup opens with different types of date options, once he selects popup closes but now now those new date range values need to some how come on top of query for user to see what he selected in pop up that is the pain point not working. I can use workaround of VP but as I have many queries like this I do not want to do workaround...
This is the EXACT same scenario I had i.e I had a query with a header with data I needed to update with refresh (and the "normal" refresh didn´t update it). "Normal" refresh only refresh data/rows in the query but a process refresh, redisplays the entire query i.e this should work and does for me. To be clear, I have a content panel with a query and in that query I have autorefresh via process enabled and the process just does a "DISPLAY NameOfQuery" and that´s it, the entire query is redisplayed and header and data/row are refreshed. Try it again or if it doesn´t work, your scenario is maybe different from mine in terms of how you have configured your VP/content panels etc..
Thank you! The way I fixed it is using getObjectData method from userguide in conjunction with refresh as you suggested(for me refresh only steps work if I have VP with 2 panels-in this case its just display query via process-no VP involved). getObjectData always goes back to DB and gets you latest n greatest data for requested object. So in query grid(with refresh) databound I call getObjectData ad put that data in grid header.
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: how to refresh current screen after popup dates

Post by Jhstephenson »

Here is what the panel looks like when it originally comes up. There are three buttons on the Panel Tool Box: Left Arrow (Go to Previous Week), Right Arrow (Go to Next Week), Curly arrow thing (Reset to Current Week):
PanelToolBoxBeforeClickingButton.JPG
PanelToolBoxBeforeClickingButton.JPG (23.71 KiB) Viewed 17002 times

Here is what it looks like after I click on the Right Arrow.
PanelToolBoxAfterClickingRightArrowButton.JPG
PanelToolBoxAfterClickingRightArrowButton.JPG (32.98 KiB) Viewed 17002 times
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: how to refresh current screen after popup dates

Post by Jaymer »

never had that problem - but any button I've put up there (other than std. Aware default buttons) has been an Add, which does something and then comes back to this screen.

even these 2 buttons dont so the same thing you do, so I have no ideas.
Screen Shot 2020-03-09 at 5.26.29 PM.png
Screen Shot 2020-03-09 at 5.26.29 PM.png (25.62 KiB) Viewed 15884 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2596
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: how to refresh current screen after popup dates

Post by hpl123 »

Jhstephenson wrote:Here is what the panel looks like when it originally comes up. There are three buttons on the Panel Tool Box: Left Arrow (Go to Previous Week), Right Arrow (Go to Next Week), Curly arrow thing (Reset to Current Week):
PanelToolBoxBeforeClickingButton.JPG

Here is what it looks like after I click on the Right Arrow.
PanelToolBoxAfterClickingRightArrowButton.JPG
I haven´t experienced this problem either and is a strange one. I use a very similar scenario where it doesn´t happen i.e the entire header is the same after refresh. I mostly use custom headers these days (saw you other post/question to Jaymer) and is a good approach and you get a lot more control and design options. Jaymer will most likely give you some pointers on how this works (and maybe some code) but in essence it´s just plan HTML with custom buttons where you can do whatever you want really. All my headers are "baked" into my apps and based on custom admin templates i.e not something I can share/export unfortunately.
Henrik (V8 Developer Ed. - Windows)
Post Reply