Jump to content

JolliBeng

Caspio Guru
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by JolliBeng

  1. If you would only like to check for a single domain, '@samplejess.com', this might work for you. 1. Create a Virtual Field - Calc Value that will check if the entered email ends with "@samplejess.com" CASE WHEN [@field:Email] LIKE '%@samplejess.com' THEN 1 ELSE 0 END 2. Add a JS code on your DataPage footer to prevent the submission if the value of the Calc Value is 0. <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { var Input1 = document.querySelector("span[id^='cbParamVirtual1']").innerHTML; if (Input1 == 0) { event.preventDefault(); alert('Enter your Caspio email!'); } else { document.forms["caspioform"].submit(); } }); </script> Then, hide your calculated value so it will not be displayed on your Submission form.
  2. You can use the IS NULL to set a criteria if the field is null. It should look like the following: (CASE WHEN [@field:Reason_1] IS NULL THEN 1 ELSE 0 END)
  3. Hi @PeterER8, Do you want to count only the number of cells that has 'Green' value per record? Is your expected output similar to the following? If yes, you can just use CASE-WHEN statements in your formula field that will check if the field has 'Green' value. (CASE WHEN [@field:Reason_1] = 'Green' THEN 1 ELSE 0 END) + (CASE WHEN [@field:Reason_2] = 'Green' THEN 1 ELSE 0 END) + (CASE WHEN [@field:Reason_3] = 'Green' THEN 1 ELSE 0 END) + (CASE WHEN [@field:Reason_4] = 'Green' THEN 1 ELSE 0 END)
  4. Hi @mrsuave, I did some minor tweaks and it worked fine on my end. Feel free to test the following code: <script> var y=document.querySelector("#EditRecordTotalCost"); //change the #EditRecordContractor_Total to the correct element that you need to reference myFunction(); function myFunction() { var x = y.value; y.value=CommaFormatted(CurrencyFormatted(y.value)); function CurrencyFormatted(amount) { var i = parseFloat(amount); if(isNaN(i)) { i = 0.00; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); i = parseInt((i + .005) * 100); i = i / 100; s = new String(i); if(s.indexOf('.') < 0) { s += '.00'; } if(s.indexOf('.') == (s.length - 2)) { s += '0'; } s = minus + s; return s; } function CommaFormatted(amount) { var delimiter = ","; // replace comma if desired var a = amount.split('.',2) var d = a[1]; var i = parseInt(a[0]); if(isNaN(i)) { return ''; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); var n = new String(i); var a = []; while(n.length > 3) { var nn = n.substr(n.length-3); a.unshift(nn); n = n.substr(0,n.length-3); } if(n.length > 0) { a.unshift(n); } n = a.join(delimiter); if(d.length < 1) { amount = n; } else { amount = n + '.' + d; } amount = minus + amount; return "$" + amount; } } </script>
  5. Hi All - just to update this thread, I would like to share that we can actually embed a video file to a DataPage by inserting the following code: <video width="400" controls> <source src="[@field:Video_File/]" type="video/mp4"> Your browser does not support HTML5 video. </video>
  6. Hi all, This article might also be helpful: https://stackoverflow.com/questions/14676613/how-to-import-google-web-font-in-css-file ~JolliBeng
  7. H @DTINVN, If I understand you correctly, you want to reduce the display size of your label or some sort of rounding off the record value. That can be configured under the 'Configure Chart Options' of your DataPage. You can refer to this screenshot: If this does not help, I suggest that you provide detailed information of what are you trying to achieve. ~JolliBeng
  8. Hi, For future reference, you may check this video on how to build a Job Posting application: ~JolliBeng
  9. Hi, Just to update this post, after the release 19.0, the IsNull() Function in your formula might not work. Using IsNull() in Formula Fields, Calculated Values and Calculated Fields will only accept date/time values for the replacement value. Please see the link below for more details: https://howto.caspio.com/release-notes/caspio-bridge-19-0/19-0-impacted-areas/ ~JolliBeng
  10. The submission form will serve as your search page. You will just need to add virtual fields so that the entered data will not be saved to the table. You may also refer to this article. ~JolliBeng
  11. Hi, I'm assuming that you're unable to sort your report by date because the data type of your field is Text. If that is the case, you'll need to convert it first to a datetime field. Here's a formula that you may use: CONVERT(DATETIME, [@field:], 101) You'll need to add a Formula field first where you can insert the formula provided above. After that, you can now select that Formula field from the Sorting options on your report. ~JolliBeng
  12. JolliBeng

    PDF Report Page

    Hi, Just to add on @AtayBalunbalunan's comment, if you have a copy of your layout saved as a Word document, you can use the Paste from Word option on your HTML block. In that way, you'll be able to print the details with your desired layout. Here's a screenshot: Also, here's the DataPage I created using that workaround. Click this link. ~JolliBeng
  13. Hi, Just to update this post, after the release 19.0, the IsNull() Function in your formula might not work. Using IsNull() in Formula Fields, Calculated Values and Calculated Fields will only accept date/time values for the replacement value. Please see the link below for more details: https://howto.caspio.com/release-notes/caspio-bridge-19-0/19-0-impacted-areas/ ~JolliBeng
  14. Hi @Jorozcorosado, Can you provide some screenshots of your expected output? ~JolliBeng
  15. Hi, You can also follow the steps on this post: Then, change the code to the following: text-transform: uppercase; ~JolliBeng
  16. Hi, You can also add a simple CSS code on your Style to enforce Uppercase in the input fields of your Submission form. You just need to follow these steps: Edit the Style that you are using. On the DataPage Elements, go to Form Details -> Fields Click Source tab, Look for .cbFormTextField and add this code: text-transform: uppercase; ~JolliBeng
  17. Hi, Just to add on @Barbie's comment, here's a useful guideline on SQL functions that are accepted in Caspio: ~JolliBeng
  18. Hi @matstein, If you want to send email to multiple users who meet a certain criteria, yes that is possible. You can add the criteria under your WHERE clause. You may refer to this sample Task: For further information regarding Task, you may click this link. ~JolliBeng
  19. Hi JamesMobiloo, Yes, that is correct. You can use Calculated Fields on Report DataPages. Aside from that, you can also use SQL functions on Calculated values on Submission forms and Triggered Actions on the table level. You may also check the Function Reference document to see the functions that are accepted in Caspio. ~JolliBeng
  20. Hi @SteveT, If you want to add filters, you can add search fields on your Search page and you can also set your form to have the search and results on the same page so you can see the filtered records right-away upon searching. Also, make sure that the logic that you are using is "AND". You may refer to the screenshots below: -JolliBeng
  21. Hi @Role21, Yes, there's a way to do that. You just need to use the following formula on your calculated field: (DATENAME(month, [@field:DATE])) -JolliBeng
  22. Hi, You can also try use the following formulas: To calculate the hours worked: CAST(DATEDIFF(second, [@field:Start_Time],[@field:End_Time]) / 60 / 60 % 24 AS NVARCHAR) +':'+ CAST(DATEDIFF(second, [@field:Start_Time],[@field:End_Time]) / 60 % 60 AS NVARCHAR) For the total hours, insert the following on your aggregation field: CONVERT(varchar(5), DATEADD(minute, SUM([@calcfield:6]), 0), 114) For calc field6: DATEDIFF(minute, [@field:Start_Time],[@field:End_Time]) You may click on this sample DataPage for your reference. Test credentials Email: test@caspio.com Pass: 1234 -JolliBeng
  23. Hi @Role21, This can be done using custom script. <script> if ('[@field:Active]' == 'Yes') { $('.check-[@field:ID]').hide(); } </script> Just change the .check-[@field:ID] to the class name of your button and ID. -JolliBeng
  24. Hi @telly, The solution that @SunakoChan provided is correct. You'll need JavaScript coding to prevent submission. For more details, you may also check this forum post: -JolliBeng
  25. Hi @TMeyer, You can hide the chart when there are no records found, using JavaScript. You need to add a Header& Footer and you can use the following code: For the Header: <div class="chart-container"> For the Footer: </div> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { if (document.getElementsByClassName("highcharts-no-data").length > 0) { document.getElementsByClassName("chart-container")[0].style.display = "none"; } }); </script> -JolliBeng
×
×
  • Create New...