Jump to content
  • 0

Reports - Tabular - Configure Results Page Fields


Question

If I have a set of results, but I would like the value in one column (yes/no) as a condition for the next column to appear; could I do something like the following?  But is there a way to work around not having rules on this type of report?.

Suppose a no value appeared adjacent to a value in the following example with states, how can I hide one or many others?

https://howto.caspio.com/datapages/reports/result-set-layouts/

 

Would the following be a start?:

<script>
if("[@field:Account_show]" == "Yes"){
document.getElementById("[@field:Account_value]");
}
else if ("[@field:Account_show]" == "No"){
document.getElementById("[@field:Account_value]").hide();
}
</script>

 

 

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I will suggest using calculated fields with SQL statement to filter the record.  

 

Example SQL code to filter a record base on the end user selection.

****  Select Account_value from table_name where target.Account_show=[@field:Account_show]

Example SQL code to filter a record with all the yeses "YES" to display.

*** Select Account_value from table_name where target.Account_show=1

I believe Account_show is a Yes/No field and it will be rendered as boolean, boolean rendered YES as 1.

 

Hope this helps.

 

 

Link to post
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.

Guest
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.

Loading...
×
×
  • Create New...