MayMusic

Caspio Evangelist
  • Content count

    1,081
  • Joined

  • Last visited

  • Days Won

    47

MayMusic last won the day on September 22

MayMusic had the most liked content!

6 Followers

About MayMusic

  • Rank
    Advanced Member
  • Birthday May 19
  1. You need to add a FORMULA field to your table to calculate 5 days before appointment : Dateadd(day, -5, [@field:AppointmentDate]) Select [@field:AppointmentDate] from picker. Then in your report you need to have the following code in HTML Block <div id="record[@field:ID]"></div> <script> if ( '[@cbTimestamp*]' > '[@field:FivedaysToDate*]') { document.getElementById("record[@field:ID]").innerHTML = "<a href='http://caspio.com'>Click here to open Caspio</a>"; } </script> [@field:ID] should be replaced with field which is keeping the unique ID and also href value with the link you want to open. [@field:FivedaysToDate] is the formula field in the table. Attached is the sample page you can import to your account CaspioData_2017-Sep-20_1404.zip
  2. Bring an example of the table and data you want to extract.
  3. If you want to hide a field if the value is not equal to Gid then you need to Add a header to your page and use the code below: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> add the code below above the conditional field in a HTML Block: <div id="b[@field:ID]"> And this code below in HTML Block: </div> <script> $(document).ready(function(){ if ("[@field:Day_Type]" != "Gig"){ $('#b[@field:ID]').hide(); }}); </script> Make sure you have unchecked HTML Editor in advanced tab for header and HTML Blocks
  4. Quiz

    Import the sample app to your account QUIZ_APP_1_0_2017-Sep-06_0926.zip
  5. Take photo

    Add a Footer to Configure Fields screen and click on Source button to paste this code <script> var myInput = document.getElementById('InsertRecordPicture'); function sendPic() { var file = myInput.files[0]; } myInput.addEventListener('change', sendPic, false); </script> Picture needs to be changed to the file field name.
  6. Add a header to your page and use the code below: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> Add HTML Block above all the elements that needs be hidden, uncheck HTML Editor in advanced tab and use the code below to create buttons and start the block that needs to be hidden <input type="button" href="#" id="s[@field:ID]" Value="Show" /> <div id="b[@field:ID]"> <input type="button" href="#" id="h[@field:ID]" Value="Hide" /> At the end of the elements add another HTML Block, uncheck HTML Editor and paste this code </div> <script> $(document).ready(function(){ $('#b[@field:ID]').hide(); $('#h[@field:ID]').click( function (){$('#b[@field:ID]').hide();$('#s[@field:ID]').show();}); $('#s[@field:ID]').click( function (){$('#b[@field:ID]').show(); $('#s[@field:ID]').hide();}); }); </script> Note [@ID] in this code needs to be replaced with the unique ID you have in your table source.
  7. I cannot replicate this issue I used the code just instead of nth-of-type(2) I have nth-of-type(1) and it is hiding the aggregation as well. What is the URL to your page?
  8. You can add a formula field to your table and use the formula below: CASE WHEN CHARINDEX('CG:', [@field:FieldName]) != 0 4 THEN CASE WHEN CHARINDEX(',', SUBSTRING([@field:FieldName], CHARINDEX('CG:', [@field:FieldName]), LEN([@field:FieldName]))) != 0 THEN SUBSTRING(SUBSTRING([@field:FieldName], CHARINDEX('CG:', [@field:FieldName]), LEN([@field:FieldName])), 4, CHARINDEX(',', SUBSTRING([@field:FieldName], CHARINDEX('CG:', [@field:FieldName]), LEN([@field:FieldName])))-4 ) ELSE SUBSTRING([@field:FieldName], CHARINDEX('CG:', [@field:FieldName])+3, LEN([@field:FieldName])+3) END END [@field:FieldName] needs to be replaced with the field that has the values in.
  9. Add the code below to the header of the page: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> window.onload = function multiselect() { var a = document.getElementsByTagName('select'); var index; for (index = 0; index < a.length; ++index) { if (a[index].size!==0) { a[index].multiple=true; } } } </script> And this code to the Footer <script> $('[name=InsertRecordServices]').change(function() { $('[name=InsertRecordDescription]').val($('[name=InsertRecordServices]').val()) }); </script>
  10. If there is no specific formatting for the email, you can add a virtual field, make it hidden and use the code below to assign non-blank values to a virtual field and then use it as your email body <script> document.getElementById('caspioform').onsubmit = function (){ var mylist = new Array("EditRecordFirst_Name", "EditRecordLast_Name", "EditRecordDOB", "EditRecordAge", "EditRecordDescription"); var email= ''; for (var i=0; i< mylist.length;i++){ if (document.getElementById(mylist[i]).value){ email = email + ', ' +mylist[i].substring(10) + ": "+ document.getElementById(mylist[i]).value; } } document.getElementById('cbParamVirtual1').value = email; } </script> This is for update/details page for submission page you need to change EditRecord to InsertRecord var mylist = new Array("InsertRecordFirst_Name", "InsertRecordLast_Name", "InsertRecordbutton", "InsertRecordAge", "InsertRecordDescription"); And change all the field names with your field names. Also you need to change this line to: email = email + ', ' +mylist[i].substring(11) + ": "+ document.getElementById(mylist[i]).value; Since InsertRecord is 11 characters and we want to only get the word after that for the label
  11. I tried this in my header and added HTML Block to create my images and it worked like a charm. <style> img { border-radius: 50%; } </style> The style rule above is the shorthand for: image{ border-top-left-radius: 50% 50%; border-top-right-radius: 50% 50%; border-bottom-right-radius: 50% 50%; border-bottom-left-radius: 50% 50%; }
  12. You need to create an authentication so user can login and you can get access to user color choice, add a calculated field to your page and use this code (CASE WHEN '[@authfield:Color1]' = '[@field:Color1]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color1]' = '[@field:Color2]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color1]' = '[@field:Color3]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color1]' = '[@field:Color4]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color2]' = '[@field:Color1]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color2]' = '[@field:Color2]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color2]' = '[@field:Color3]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color2]' = '[@field:Color4]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color3]' = '[@field:Color1]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color3]' = '[@field:Color2]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color3]' = '[@field:Color3]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color3]' = '[@field:Color4]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color4]' = '[@field:Color1]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color4]' = '[@field:Color2]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color4]' = '[@field:Color3]' THEN 1 ELSE 0 END) + (CASE WHEN '[@authfield:Color4]' = '[@field:Color4]' THEN 1 ELSE 0 END) You would then see: If you do not want to see the user it self in filtering you can add name not equal and receive from authentication
  13. Can you elaborate what is the calculation and table setting. To have all aggregations show up in one row, you can create a details page and add calculated field with SQL to get the SUM value.
  14. Restrict date range of calendar popup?

    That is a good question, how can we gray out some dates and only show a specific range?
  15. Add image in email notification

    Thanks for sharing