One to many data link color
Is there a way to use CSS to update the font color for one to many data link labels?
In the image below, I have a one to many data link that returns a list of past code cases on for a property. If the user clicks on of the items, it opens up with more information about that case. However, since it's just black text, it's not obvious that it's interactive and contains more info. I know it has a highlight color when you hover your mouse over it, but that doesn't help when using the viewer on a touch screen or phone.
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000TS5d&feoid=Body&refid=0EM60000000Lv7O"_/_img_
0
-
Hi John,
You could use CSS. I think this might do what you are looking for. You can remove the text decoration if you don't want the underline.FeatureDataLinksProviderView .list-menu-item{ color:blue; text-decoration:underline; }
Hope this works for you.
Regards,
Chris Mayhall0 -
That's exactly what I was looking for, thanks!
For future reference, how did you know that was the CSS selector to use?0 -
If you right click and inspect the element (chrome or firefox) you can view the classes of the elements. I got the class of the text and then found the parent that was specific to datalinks. I combined those so it would only select menu items in the datalinks div.
hope that makes sense.
Regards,
Chris Mayhall0 -
John,
I'm just starting to use data links and wondered how you were able to control the display field for your data. Mine only displays as ObjectID and I can't figure out how to change it.0 -
Chris,
That's awesome, thanks for the extremely valuable tip!
Rebecca,
For one to many data links, the display field is just the first value. As such, I format the first field in my data link so it looks good in a list. As an example, if there's a related code case on a property, I would format the first field to something like CaseDate + " - " + Address + " - " + CaseType
That way the display field for each link would provide the information I want it do, such as 12/31/15 - 100 Main Street - Trash Violation
I also order my data link the way I want them to sort, for example by CaseDate desc.0 -
Thanks John! I was trying to avoid restructuring the data but it seems like that may be the only option right now. Showing ObjectID is pretty useless. 0 -
You shouldn't have to restructure your data, just the query. The data link only shows the fields you tell it to the Select part of the query. So if you don't want to include the ObjectID in the results, just don't use it as a selected field. 0 -
I have just begun exploring data links. I love the flexibility this provides, but I have not figured out how to drill down to see additional data related to the returned linked data. The links are listed correctly, but clicking on them doesn't do anything. 0 -
Are you using one-to-one or one-to-many data links? It's only with one-to-many that you will have clickable results since each result is basically a related set of information. One-to-one data links basically just return additional attributes for a feature. 0 -
Kathy,
If done correctly, you should be able to select a result and then the related info would show at bottom. If you go to Table View then they will show in a new tab.0 -
John and Mike,
I am using a one-to-many data link. After your response validating that this should work as I supposed I did some more research and found a post that showed this required change to the site's desktop.json:
{
"type": "geocortex.essentialsHtmlViewer.mapping.modules.FeatureDetails.FeatureDetailsProviders.DataLinksViewModel",
"viewId": "FeatureDataLinksProviderView",
"viewType": "geocortex.essentialsHtmlViewer.mapping.modules.FeatureDetails.FeatureDetailsProviders.DataLinksView",
"iconUri": "Resources/Images/Icons/Toolbar/details-24.png",
"markup": {
"compact": "Mapping/modules/FeatureDetails/FeatureDetailsProviders/DataLinksView.html",
"expanded": "Mapping/modules/FeatureDetails/FeatureDetailsProviders/DataLinksTableView.html"
},
"title": "@language-feature-datalinks",
"config": {
"dataLinkDetailsView": "DataFrameResultsContainerRegion"
}
}
I learned a lot from this post - - thanks to all!0
Please sign in to leave a comment.
Comments
11 comments