Jump to content
  • 0

Hyperlink in a calculated field



5 answers to this question

Recommended Posts

  • 0

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.





Link to comment
Share on other sites

  • 0

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)



// 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

    //Hide the fields on nth column
    ff.forEach( function(elem) {
      elem.style.display = "none";

  }, 1000);



I really hope this helps.


Link to comment
Share on other sites

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.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...