Jump to content

Hey Guys, I have a date control as below: image.png1017290...

VisuaLizeFOCUS .

Recommended Posts

This is a difficult one.

I only just asked TechSupport the question of event on change of filter value and seems there isnt any.

One option is to add a js interval to check the text in the control for Custom, then enable the two controls. This requires the use of a Assembled Vis page or a Create Vis converted to a page.

Hoping someone else jumps in and give a better solution.

Link to comment
Share on other sites

Hey Raj

I PMd you one idea but since I am awful at Javascript, Id take that PM for what its worth.

I really like the idea of a Calendar Control that shows a pre-set date, then if you want to change it to a date range (like choosing custom), then it should pop up to let you mess with that.

I think this would be a good New Feature Request (NFR for new folks here). Maybe open a case asking for this as a feature.

Its a drag to use CM Export, text editor, CM Import to try to edit designer files, but given no other option, its a thought.

Link to comment
Share on other sites

Hi Toby,

The values in the drop-down are as per business requirements. I know there is one feature in Page designer where you can club your date controls to get a set of multiple options.

But I am really interested to try out this in page designer JS.

Will definitely open a case with IBI on this lets see what IBI will recommend.

IBI has provided more freedom by adding external JS and CSS to page designers but it would be best to give more freedom to developers to put some JS code in such a way that HTML pages can be put out of the picture. I like page designer so much its easy, looks so good and saves you from extra code to provide responsiveness.

Link to comment
Share on other sites

I created a fex:

-DEFAULT &DateRange = 'Custom';



-DEFAULT &PositionType = _FOC_NULL;

-TYPE &|DateRange = &DateRange.(<Custom>,<Last Week>,<Last Month>,<Year to Date>,<Last 12 Months>,<Last Year>,<Last 3 Years>).Date Range.

-TYPE &|StartDate = &StartDate.(|FORMAT=YYMD).Start Date.

-TYPE &|EndDate = &EndDate.(|FORMAT=YYMD).End Date.

-TYPE &|PositionType = &PositionType.(<All,_FOC_NULL>,<One>,<Two>).Position Type.


and put this fex on a Designer page, then assigned both date controls the Classes datecontrol


image.png1169238 16.9 KB


I borrowed some JavaScript code from Ashley Leggores post: [sOLVED] JavaScript on load function

and developed the following JavaScript, adding it to the Designer page:

$("body").on("blur", ".ibx-select-item-list-paged-inner", function() {

var page = document.querySelector(".pd-page").ibaObject;

var pageUtil = PageUtil.getPageUtil(page);

var amperManager = pageUtil.getAmperManager();

var values = "";


amperManager._ampers.forEach(function(amper) {

if ( amper.info.name == 'DateRange' ) {

if (amper.info.curValue != 'Custom') {



else {$('.datecontrol').show(500);







Run the page and it will hide the Date controls when anything other than Customer is selected:


image.png1756238 14.8 KB



image.png1756242 11.3 KB

Link to comment
Share on other sites

I am seeing a problem when I tried to call the Portal from the Proxy link (Load balancer).

The Jquery giving me some issues and filters are not loaded and loses their properties.

When I run the portal without using the Proxy link it runs fine.

As per me, I think with Proxy link it is not able to load the Jquery file as here Jquery functions are used.

Without Proxy link


image.png1097312 25.3 KB


With Proxy link


image.png1002141 9.02 KB


Is it possible to refer Jquery file inside Page Designers JavaScript

I am trying to find this solution.

Link to comment
Share on other sites

Okay so I tried to refer jQuery js file from Page Designer java script and it was a bad idea.

After doing deep analysis It seems like when we apply JavaScript code to a Page Designer it can make the page corrupt.

And this was the case here.

Currently I am doing testing on it lets see what more information I can gather.

Link to comment
Share on other sites

So, was playing around with this and found out :


Page designer pages can get corrupt while applying Javascript code.




even after this that page is editable but I have no idea why I got this error and there is no way to solve it.


With the same JS code other page worked.


Its will be very interesting to see what is causing the page to get corrupt.

Link to comment
Share on other sites

If you turn on your session viewer you will see there is a request to run a fex that is not correct. I beleive you get this error if you try to RUN a folder. So instead of /WFC/Repository/Sales/Forecast/next_year.fex being passed in, you sent /WFC/Repository/Sales/Forecast
Link to comment
Share on other sites

Hi Brian,

When we include a procedure in a page designer container it takes its path and i believe we cannot change it unless n until we drag n drop a new proocedure on the same container.

And as far as this error is concerned this is on the designer page when i run it after applying java script and css code. After getting this error i created a similar page with the same code and it ran without any error. There must be something wrong when we include a custom JS code inside it

Link to comment
Share on other sites

  • 5 months later...






For me everything works only when i click the Drop down. initial load i see all the controls. i am trying to force the blur event when the page loads but no luck.

Initial Load


image.png1306182 23.3 KB


After i select the dropdown everything works as expected. did you get update from the case


image.png1289113 19.3 KB

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...