KAPITYAN Posted August 15, 2018 Report Share Posted August 15, 2018 How to make query results as hyperlink in a calculated field? Quote Link to comment Share on other sites More sharing options...
0 DefinitelyNot31337 Posted August 16, 2018 Report Share Posted August 16, 2018 Hello, @NJConrcs. I tested something which seems to be a viable solution. Turns out you can actually use your calculated field in an HTML block. (See image) The default formatting for Calculated Field is Integer, you might want to double check if you want the returned value as a String. After then, you may be able to use that as a hyperlink. Regards, DN31337 Quote Link to comment Share on other sites More sharing options...
0 DefinitelyNot31337 Posted August 16, 2018 Report Share Posted August 16, 2018 I just want to add something, though it's a bit off topic. In the solution I provided above, it seems that there's no way we can hide the Calculated Field within the standard features of Caspio. (see sample result below). I just presumed that there are some cases where we might want to hide that Calculated Field. As far as I have investigated, there are no current features of Caspio that can do that so I'll just present some CSS workaround to hide that Calculated Field. Do the following: 1.) Add a header and footer 2.) Click on footer, disable HTML Editor in the Advanced tab; then 3.) Paste the code below and set the calc field index to correspond with the position of your Calculated Field (in my case, 3) <script> // Column Index var CalcFieldIndex = 3; /* Sample usage (asterisks* not included): * * var CalcFieldIndex = 2; * * var CalcFieldIndex = 4; * * var CalcFieldIndex = 7; */ // Do not edit syntax from this point onward!!! // Select the fields in nth column var ff = document.querySelectorAll("table[id*='cbTable'] tr th:nth-child("+ CalcFieldIndex +"), table[id*='cbTable'] tr td:nth-child("+ CalcFieldIndex +")"); // Give 1 second delay to remind devs that we have JS code setTimeout(function(){ //Hide the fields on nth column ff.forEach( function(elem) { elem.style.display = "none"; }); }, 1000); </script> I really hope this helps. DN31337 Quote Link to comment Share on other sites More sharing options...
0 Kronos Posted April 29 Report Share Posted April 29 Hi, sharing this similar forum thread in case this might help: Quote Link to comment Share on other sites More sharing options...
Question
KAPITYAN
How to make query results as hyperlink in a calculated field?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.