Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

VA123's Achievements


Newbie (1/14)



  1. Depending on what location is associated with a user(a column in the user table - the parameter), I would like to selectively hide a specific column in a report datapage. I am able to get Caspio to hide the column as desired on the preview Caspio page , but when deployed, Caspio seems to ALWAYS hide the column, regardless of the Country condition. Could you please take a look? This is where the datapage is deployed: https://dsmtest001.weebly.com/testjsreport.html. There are 2 user accounts-> 1. user1@test.com | 12341234 - Country is USA 2. user2@test.com | 12341234 - Country is Canada Column B should be hidden for the USA user but not the Canadian user. The selective functionality is achieved through the following code, inserted in the header of the report datapage: <script> alert('[@authfield:Country]' +' is the current country ' + ' -> going to hide column/row B if country is USA'); if ('[@authfield:Country]' === 'USA') { document.getElementById('targetxxx').innerHTML = "<style>#targetxxx table:nth-of-type(1) td:nth-of-type(2) {display: none;} </style>"; document.getElementById('targetxxx').innerHTML = "<style>#targetxxx table:nth-of-type(1) th:nth-of-type(2) {display: none;} </style>"; } </script> <div id="targetxxx"> and the below inserted in the footer: </div> Last but not least, attached is the sample Caspio app CaspioData_2019-Feb-25_2157.zip
  2. Thank you for providing this additional feedback - it gives me a lot of material for experimentation to fill my free time.
  3. Can you do this in real time or you have to send requests every hour through the REST API? I would like to get real time updates exports from Caspio via some way or form. I know you can do this with Zapier, though Zapier is not HIPAA compliant.
  4. Thank you very much. Your solution makes perfect sense and I was able to implement it. The demo you posted was helpful as well! Just out of curiosity, is there a guide somewhere on how to pass parameters through JS through Caspio? Or what are some of the considerations I need to take into account if I ever had to pass parameters using JS through Caspio?
  5. How are you thinking of passing the Yes/No field from the user table to the 'Rules' section - 'Rules' cannot receive values from a different table - only parameters. Otherwise your solution is pretty close to what I had in mind. If you had a few minutes and do a Demo datapage, that could probably work as well. I am thinking of having a [Country] column in my user table. Let's say we have MX, US and CA as countries. The problem is that I cannot pass this [Country] column as a parameter through the Authentication datapage. And the 'Rules' section only has options for 'Condition', which are Field(from the underlying table of the datapage), Parameter and Value - therefore I don't know how to read the [Country] from the user table in the 'Rules' section, because [Country] is in another table(the user table), and is not passed. Hence, my ask for a JS solution on passing a custom parameter through the Authentication datapage, that can then be received/selected by the 'Rules' section. Thanks for looking into this.
  6. kpcollier, thank you for your feedback. Agreed, your solution would do the job you described, but unfortunately not my problem. 1. I have 50+ datapages - I don't want to duplicate and redeploy all of them 2. The CA/US was just an example - there are a number of differences between the datapages that need to be implemented
  7. Hi Ruel Jay, Unfortunately record level security is not what I need to use here. I do not want to restrict the users access to data, I want to restrict the users access to specific datapage features. Hence the need to pass a parameter from the login screen. One example - if the user is Canadian, they have provinces for Zip Code, if the user is based in the US, we have Zip Codes and not provinces. Hence based on where the user is from different fields need to be shown/hidden in the data forms. If be great if you could take another look at my code and advise how I can pass a custom parameter. CaspioData_2019-Feb-12_1534.zip
  8. I have ticketing application, which is spread over many datapages (50+). Out of a userbase of 20, I have 5 users that don't need to see the full app, but only a 'limited' version. I think this could be achieved if I pass a parameter through the login authentication page, which would be received by any subsequent datapages the users visit(and then add conditional logic on each datapage to hide whatever needs to be hidden, if a specific parameter is received). My issue is the standard Caspio interface can only pass the login information (e.g. Email) as a parameter through the authentication page - e.g. [@testpar]? <script> document.addEventListener('BeforeFormSubmit', function (event) { var comparevar = document.getElementById("xip_Email").value; if (comparevar === 'user1email@test.com') { //pass [@testpar] = 'limitedView' } }); </script>
  9. Sure, the above works if used verbatim. However, my 1st field as referenced above, "Value1", is a parent cascading field, and my 2nd field, as referenced above,"Value2", is a virtual calculated field. What would be the best way to access them? Since the below does not mention calculated fields.
  10. I am using a submission form and trying to customize it. It's a simple script that displays a warning message and stops submission, if a user makes a certain combination of selections(i.e. selects ABC from a dropdown and XYZ is calculated in the Virtual field. However, the code does not seem to work. Could somebody take a look and let me know what I am doing wrong? The UseCaseType is a dropdown with a lookup table linked to it, and the Virtual Parameter is a Calculated Value SQL script(that does work). For some reason, a and b are populated as nulls. <script> document.addEventListener('BeforeFormSubmit', function (event) { var a = document.getElementById("InsertRecordUseCaseType").value; var b = document.getElementById("cbParamVirtual2").value; alert('a is ' + a + ' | b is ' + b); if (a == 'ABC' && b == 'XYZ') { alert('You cannot select ABC and XYZ together'); event.preventDefault(); } }); </script>
  11. I have a default reference table with prices for different types of fruit - e.g. pear 1 $1.05, pear 2 $3.02, pear 3 $2.01, apple 1 $7.56, apple 2 $15.02.... and so on ... the list is ~200,000 rows long. I also have a summary table, which has different baskets price arrangements based on the reference table - e.g. basket 1 price=pear 1 + apple 5 + plum 11; basket 2 price = pear 5 + apple 7 + grapes 3; etc. What would be a good way to construct a tool which would allow DIFFERENT users to calculate basket prices using different fruit prices? E.g. User 1 wants to calculate the price for basket 1 by changing the price of pear 1; User 2 wants to calculate the price for basket 1 by changing the price of apple 5? I know I can copy through a triggered action the different basket component prices from the reference table to the summary table, though I need the reference table to stay unchanged, and I can't copy 200k rows every time a user updates a price. Any suggestions about a structure? Thanks!
  12. Thanks, the above guide was quite helpful with JS, though did not necessarily address the issue I am having. All of my fields are of form 'Display Only', hence it does not look like I can reference them in JS. Would appreciate any additional comments or other suggestions.
  13. If possible, could a member please assist with the above? Thanks!
  14. Let's say the condition is this: 'I have a field named Indicator with different text values. If the text value in field named 'Indicator' is equal to "Final", the font color must be set to red.'. Dunno if this helps, but the 'Indicator' field is the 2nd column in the table, underlying the report. Again, this is for a Details Report datapage. Thanks!
  15. Hi All, I have a Details Report datapage where I would like to dynamically change the text color of a field. I looked at the below post, and it does everything I want to do, but it is for a tabular report. I am using a Details Report. Could someone help me modify the below code to a details report? (e.g. I have a field named Indicator and it is the second column in the report. If the text value is equal to "Final", the font color must be set to red.) https://forums.caspio.com/topic/7031-change-the-font-color-of-a-field-based-on-its-value/?tab=comments#comment-21628
  • Create New...