Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Conditionally show hyperlinks in crosstab
EricHougen
I'm trying to figure out how to only show a hyperlink in a cross tab if the system date = a date that is a dimension value. Instead of displaying the hyperlink for the system date, the hyperlink is shown for all values. I would have assumed that if my script was wrong, none of the hyperlinks would be displayed, but instead I get the opposite.
I wrote the following javascript for the hyperlink:
if(data["backlog_Group/dates"]=BirtDateTime.today()){"
https://gwuapp.assetworks.com/fmax/screen/PHASE_BROWSE?aePProE.description.sortOrder=20&aePProE.orderType=OPERATIONS&aePProE.proposal.sortOrder=10&aePProE.longDesc.operator=CONTAINS&aePPhsE.description.operator=CONTAINS&aePPhsE.statusCode.operator=IN&aePPhsE.statusCode.sortOrder=13&aePPhsE.locationCode.sortOrder=31&aePPhsE.statusCode=OPEN,WORK IN PROGRESS,ESTIMATE REQUIRED,HOLD,ESTIMATE COMPLETE,AWAITING MATERIAL,ASSIGN&aePProE.longDesc.sortOrder=21&aePProE.bldg.sortOrder=30&aePProE.category.operator=IN&aePProE.description.operator=CONTAINS&aePPhsE.sortCode.sortOrder=11&aePProE.contact.sortOrder=40&aePPhsE.shop="+data["shop"]+"&aePPhsE.description.sortOrder=22&aePPhsE.longDesc.operator=CONTAINS&aePProE.contactMc.sortOrder=60&aePProE.contactPh.sortOrder=50&aePProE.category=SERVICE CALL,CALLOUTS"}
I could get similar scripting to work for highlighting the cell, but I can't get it to work for the hyperlink.
I'm attaching the report plus a pdf of the same. Any ideas?
Find more posts tagged with
Comments
rmurphy
Your if statement (both posted and in the attached rptdesign) are performing assignment (=) rather than comparison (==).
EricHougen
here's how I got it to work:
if (BirtDateTime.diffMinute(data["dates"],BirtDateTime.today())==0){"
https://gwuapp.assetworks.com/fmax/screen/PHASE_BROWSE?aePProE.description.sortOrder=20&aePProE.orderType=OPERATIONS&aePProE.proposal.sortOrder=10&aePProE.longDesc.operator=CONTAINS&aePPhsE.description.operator=CONTAINS&aePPhsE.statusCode.operator=IN&aePPhsE.statusCode.sortOrder=13&aePPhsE.locationCode.sortOrder=31&aePPhsE.statusCode=OPEN,WORK IN PROGRESS,ESTIMATE REQUIRED,HOLD,ESTIMATE COMPLETE,AWAITING MATERIAL,ASSIGN&aePProE.longDesc.sortOrder=21&aePProE.bldg.sortOrder=30&aePProE.category.operator=IN&aePProE.description.operator=CONTAINS&aePPhsE.sortCode.sortOrder=11&aePProE.contact.sortOrder=40&aePPhsE.shop="+data["shop"]+"&aePPhsE.description.sortOrder=22&aePPhsE.longDesc.operator=CONTAINS&aePProE.contactMc.sortOrder=60&aePProE.contactPh.sortOrder=50&aePProE.category=SERVICE CALL,CALLOUTS"}
//if (1==1){"
https://www.yahoo.com"}
I think the key was normalizing the date format using the BirtDateTime.