Select to view content in your preferred language

esearch default filter

7169
35
03-22-2016 09:59 AM
RudoDuncan
Deactivated User


Is it possible to display the first couple of days of calls for service so that my users can see the last 48hrs by default? Then if they wanted to see something prior to that they can search for it using the filter. Currently, my users have to put in a date filter every time they open the application.

0 Kudos
35 Replies
RobertScheitlin__GISP
MVP Emeritus

looks good

0 Kudos
RudoDuncan
Deactivated User

Thanks, I refreshed my browser and clicked on my widget and noting happened. I am sure that I am missing something silly here. I am a novice javascript developer.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

actually the code above looks good but the placement does NOT. It looks like line 910 for you placed the code inside the _removeResultItem function. This is not the correct place for it. Remove that code from there an scroll up and fin the comment "//now check if there is a url search to do" and count that line and down 27 line. The next line after 27th should be: "if(this.serviceFailureNames.length > 0){". Right above "if(this.serviceFailureNames.length > 0){" is where you need to place the code. This is the issue with providing line numbers to code that on your end I am not sure what version or changes you have made.

0 Kudos
RudoDuncan
Deactivated User

Not providing the line number confused me a little. Would this help?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

  Our line numbers are quite different. Where you need to add the code is NOT in the _removeResultItem function. It is in the _initLayerSelect function. Where you need to put it is before the line numbers you show above. What you need to do is search for this text "if(this.serviceFailureNames.length > 0){" it should only occur once in your code and you need to add the code we are talking about right above that line.

0 Kudos
RudoDuncan
Deactivated User

I believe I pasted the code in the right spot and still nothing happened.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

  Is your browsers web console showing any errors?

0 Kudos
RudoDuncan
Deactivated User

It looks like this is the only error that I am getting.

I've attach my Widget.js of my cfsSearch folder. If you get a chance to look at the code, maybe you can spot something that I am not seeing. Thanks again Robert.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

  Nothing is jumping out, beside you still had the code added to the _removeResultItem function which would eventually cause an issue.  Please attach your whole cfssearch widget folder as it looks like you have errors in other files in your widget.

0 Kudos
RudoDuncan
Deactivated User

Here it is. Thank You

0 Kudos