Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 07/06/2019 in all areas

  1. 3 points
    Hi @bbewley, @kpcollier, You may try using this JS which should go to the Footer: <script type="text/javascript"> function formatAsDollars(el) { el.value = el.value.replace(/[^\d]/g,'').replace(/(\d\d?)$/,'$1').replace(/^0+/,'').replace( /\d{1,3}(?=(\d{3})+(?!\d))/g , "$&,"); el.value = el.value ? '$' + el.value : ''; } let fields = ["FIELD_1", "FIELD_2"]; //specify your fields here fields.forEach(element => { element = "InsertRecord" + element; // replace "InsertRecord" with "EditRecord" for Details/Single Record Update DP document.getElementById(element).onkeyup = function() { formatAsDollars(this); } document.getElementById(element).onchange= function() { formatAsDollars(this); } }); </script> Pay attention to comments. Hope this helps. Vitalikssssss
  2. 3 points
    Hello I want to share something with you guys again. Back then when I only have an 'explore plan', I'm using this workflow to send acknowledgement/notification emails on different persons base on a value of a field in my submission form. My workflow back then is I have a submission form for job applicants. I want to send an email to a certain member of my company depending on which position the applicant is app laying. for example. If the applicant is applying for a staff position, there will be an email an email send to staff manager, If the applicant is applying for an agent position, there will be an email an email send to agent manager. etc... This could easily be done via trigger but since it was unavailable on explore plans. This is what I did. First I made a lookup table containing the emails of the designated managers where I used the job they are managing as a unique field. Then on my submission form. I made a virutal field and set it as a cascading dropdown that is using the field for the position the user is applying for as a parent field and used the table containing the emails of the managers as a lookup table. I enveloped this virtual field with html blocks with html codes for hiding fields. please see this documentation for reference : https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/ and https://howto.caspio.com/datapages/datapage-components/cascading-elements/ . Now that it was hidden, we will now proceed to the messaging options. It is up to you to chose if you want an Notification emails or Acknowledgement emails. As I check It works with any of them as long as you are going to use the virtual field with cascading value as the field reference for email. It will now send an email on different person depending on what job the user is applying to. I hope it helps anyone. Also please comment if you have a better idea. Quack
  3. 2 points
    An Agent from Chat support gave me this doc. Its not official but I hope it helps quack: Table Variables .pdf
  4. 2 points
    Hastur

    How to get the file size

    Hello @CoopperBackpack You may use additional JS code to implement this workflow: <script type="text/javascript"> document.addEventListener('DataPageReady', fileInputEvent) function fileInputEvent() { document.querySelector("#InsertRecordFile_f"),addEventListener('change', fileInputHandler); // use the InsertRecord[your file field name] instead document.removeEventListener('DataPageReady', fileInputEvent) } function fileInputHandler(event) { const fileSizeInput = document.querySelector('#InsertRecordFile_size'); // use the InsertRecord[your file size field name] instead fileSizeInput.value = event.target.files[0].size; } </script> Insert this code into the header of the submission form. Do not forget to disable the HTML editor. For the file size field use the Number data type. You also may make the size field hidden in the submission form.
  5. 2 points
    LittleMsGinger

    onsubmit not working

    Hi @Johnn, You can use FormSubmitted event handler. I saw it in the howto article: https://howto.caspio.com/datapages/ajax-loading/ <script type="text/javascript"> document.addEventListener('FormSubmitted', function(event) { alert('Submitted'); }); </script>
  6. 2 points
    Please ensure that you don't have referential integrity enabled in you table relationship. According to the note in https://howto.caspio.com/tables-and-views/triggered-actions/:
  7. 2 points
    Hi @roattw If this is a submission form I assume you mean something like this; Where you can have headings over each section? If so you can split the form up into sections with columns to suit and have HTML block in-between their own sections set at 1 column to span the page like this; This is one column proceeded by the HTML block with the next section containing the submission form fields; You will have to experiment (a lot!) to get decent results and spacing for your whole form as if you start mixing section columns other then 1 and X (in my case X = 5) it will space them to overcome this I either used columns of 1 or 5 and if required less then 5 used 1 and had the elements continue on the same line. Your other option would be to build a full HTML table within the HTML block something similar to this; <style> .wrapper { background-color: lightgray; padding: 5px; } td { padding: 10px; } </style> <table border="0" cellpadding="1" cellspacing="1" style="width:100%;"> <tbody> <tr> <td><strong>Some Data 1</strong></td> <td><strong>Some Data 2</strong></td> <td><strong>Some Data 3</strong></td> </tr> <tr> <td class="wrapper">[@field:Some_Data_1]</td> <td class="wrapper">[@field:Some_Data_2]</td> <td class="wrapper">[@field:Some_Data_3]</td> </tr> <tr> <td><strong>Some Data 4</strong></td> <td><strong>Some Data 5</strong></td> <td><strong>Some Data 6</strong></td> </tr> <tr> <td class="wrapper">[@field:Some_Data_4]</td> <td class="wrapper">[@field:Some_Data_5]</td> <td class="wrapper">[@field:Some_Data_6]</td> </tr> </tbody> </table> Which would result in something like; Again you would have to experiment with layout to match the rest of your form/fields but may be a possible solution but without seeing exactly what you want as an end result its a bit hard to offer any further advise. Good luck, Roosta
  8. 2 points
    Ha! I got this working. I missed the step of having to name the ID for the No Results Message in Localizations. If someone else needs to change the header message when no results are found, this is how. I found some clues using this online help page, https://howto.caspio.com/integration/map-mashup/hiding-the-map-when-no-results-are-found/ Go to Localizations and choose the language you're using, and go to #351 No Records Found. Add a custom message if there isn't already one, and put a div tag around it with an ID, mine is "norecord" for this example. Then add another div tag around the header content you want to change and also give it an ID, ID="HOW" for this example. Then add this code to the footer of your Configure Results Page Fields: Match whatever names you give the respective fields to the IDs in the code below. <script type="text/javascript"> if (document.getElementById("norecord")) { document.getElementById("HOW").innerHTML = "THE NEW CONTENT YOU WANT DISPLAYED WHEN THERE ARE NO RECORDS"; } </script> This new content will overwrite whatever content is in the <div> named HOW when the search returns no results. If you're adding HTML to the new content, you need to escape all your quotes or it won't work. I made that mistake. In a link example, it would be: <a href=\"http://mywebsite.com\">Visit my website!</a>
  9. 2 points
    You can use the code below as a reference. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var c_checkbox = document.getElementById("selectAll") ; var elementID = event.detail.uniqueSuffix; function c_event () { if (c_checkbox.checked) { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.length; i++) listBox.options[i].selected = true; } else { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.length; i++) listBox.options[i].selected = false; } } c_checkbox.onclick = c_event; }); </script> Add this in your search's footer with the HTML editor being disabled. Just make the necessary changes for your form elements' ID attribute. You may use this guide for that.
  10. 2 points
    Hello Batchini! Well, there would be two ways how to create this. If we're going to use trigger, this may be a complex one. One easy way I thought of is with the use of Calculated Fields, but this would only be on a DataPage Level. You can use this formula to get the Minimum Value. SELECT MIN(FieldName) FROM Child WHERE ID = target.[@field:FieldID] Assuming if you have a foreign Key inside your child table. So we'll be using this formula to display the minimum value, Datasource would be your parent table. I hope this helps. Scar();
  11. 2 points
    Hello @TroubleShooter, The reason why the ampersand symbol is being cut is because Caspio renders the link literally. In this example: <a href="https://www.google.com?myParameter=[@field:someField]"> Link </a> If "someField" evaluates to "Some Value & Another Value" then the mark-up would result to <a href="https://www.google.com?myParameter=Some Value & Another Value"> Link </a> This is when urlencoding comes into play. What this does is substitutes the special characters in a standard HTML format which interprets characters a different way. You may try using my code snippet below. 1.) Just replace the link ID with the id attribute of your link. 2.) repeat the addParameter function as needed. The first argument is your parameter name, and the second argument is your field value. <a href="#" id="link-1">MyLink</a> <script> // DO NOT TOUCH FROM THIS POINT var params = []; addParameter = function(qs, val){ params.push(`${qs}=${encodeURIComponent(val)}`); } //UP TO THIS POINT var link_id = "link-1"; var base_url = "https://SomeDomainFrom.caspio.com/dp/926560as124321324dasd00a6523f123123624543123423fc0453b9093"; addParameter('boo', '[@field:SelectedAction]'); //repeat as needed addParameter('far', '[@field:SelectedAction]'); // DO NOT TOUCH FROM THIS POINT var queryString = params.join("&"); document.querySelector(`#${link_id}`).href = `${base_url}?${params.join("&")}` //UP TO THIS POINT </script> Works for me. -DN31337!
  12. 2 points
    I suggest using Print.js. With Print.js you can target the specific id of the element that you wanted to print out as a PDF. More info on the link here: https://printjs.crabbly.com/
  13. 1 point
    Hi @telly, You can use this code to prevent a submission form if a certain condition is not met. <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function () { event.preventDefault(); var a = document.getElementById("InsertRecordFIELDNAME").value; if (a > 100) { alert('Please enter number less than 100.'); } else { document.forms["caspioform"].submit(); } }); </script> Cheers!
  14. 1 point
    Assuming your DataPage A is a submission form, this is possible if you enable the On exit: Pass field value as parameter. Upon submission, your Single Record Update form will capture this parameter if you have this. Just ensure that AJAX is enabled for both DataPages. https://howto.caspio.com/datapages/ajax-loading/
  15. 1 point
    Alison

    Change color of the column in chart

    Hi, Hi can I change the color of the column in chart for the blank values. For example, I want the color of the first column (blank) to be color red
  16. 1 point
    SinJunYoung

    Change color of the column in chart

    Hello, you can also try getting the nth child but will be a static change of color display. But since the chart will always return the blank in the first line, we can always modify the 1st one to be set as orange. Try pasting this to the header as well: <style> rect.highcharts-point.highcharts-color-0:nth-child(1) { fill: #ffd3a8; } </style> If you want to also apply different colors to the other values, change the bold number to any desired displayed number and it should work as expected.
  17. 1 point
    I would like to format the auto-email on submit of an update form as neatly aligned table Vendor Number [@SA_Vendor_ID] Invoice Number [@MS_InvNo] Current Date [@Date()] Total Amount [@MS_InvAmount] Currency (fixed “USD”) SES Number [@MS_SESNo] PO Number [@SA_Purch_Order] How can I make this happen?
  18. 1 point
    CoopperBackpack

    Excel formula to Capsio

    Hello @capsio88, To replicate your formula, please, use the CASE expression with its CASE WHEN THEN ELSE construct in T-SQL. Also, please note that AVG SQL function is available only in the Totals&Aggregations on the Report DataPages and has specific syntax https://howto.caspio.com/datapages/reports/advanced-reporting/totals-and-aggregations/ As a workaround you may sum all required columns and divide them to get the average value. Your first formula should look like this: CASE WHEN [@field:field_1] IS NOT NULL AND [@field:field_2] IS NOT NULL AND [@field:field_3] IS NOT NULL AND [@field:field_4] <=3 THEN ([@field:field_1]+[@field:field_2]+[@field:field_3])/3 ELSE ' ' END
  19. 1 point
    Hello @roattw I think this solution will not work with responsive. If you leave the open HTML tag in the HTML block with the responsive enabled, the tag will be closed automatically. But without responsive it still can work perfectly.
  20. 1 point
    Many thanks for this kpcollier, really useful info.
  21. 1 point
    Hi @Leon13, You may remove the open and close symbol "<>" and insert "&nbsp;" instead.
  22. 1 point
    Hi @roattw, Actually, you can use Pivot table to achieve your desired Report. You can use Totals and Aggregation under values and add custom formula. This will be the result Cheers! -LittleMsGinger
  23. 1 point
    I believe this is what you need: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { location.reload(); }); </script>
  24. 1 point
    SunakoChan

    Date format

    Hi @Telly, I suppose that you are using Date/Time field. Since it is a Data/time field you have to convert the Field in to text after that use substring for the month, you may use this formula below: CONVERT(VARCHAR, (SUBSTRING('JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ', ((Datepart(month, [@field: DATEFIELD])) * 4) - 3, 3))) + ' -' + CONVERT(VARCHAR, (Datepart(day, [@field: DATEFIELD))) + ' - ' + CONVERT(VARCHAR, (Datepart(year, [@field: DATEFIELD]))) I hope this helps.
  25. 1 point
    Hi, The suggested method is not available yet. Here is another way to accomplish it. Create a calculated field with something like below and have this as part of the email body. SELECT snv_id = 'Not updating your browser already resulted in the following records being submitted with missing info:' + char(10) + STUFF(( SELECT ', ' + snv_id + ' ' + CONVERT(VARCHAR(10), Visit_Date, 101) + ' ' + Client_Last_Name + ' ' + ' ' + Client_First_name + char(10) FROM _v_v_VisitNotes_Browser where _v_v_VisitNotes_Browser.nurse_User_ID_num_SNV= '[@authfield:Nurse_UserName]' FOR XML PATH('') ), 1, 1, '')
  26. 1 point
    Hello, One question for my Information (data pages) uploaded in Caspio. 1)Eventual disclosure to third parties you make, if any, for all information I will upload: please list3rd party entities in case; 2)Erasing / right to oblivion policies in places at your end for all the information I upload. How I can control it. Thanks Roberto
  27. 1 point
    douvega

    Have calculated field in tabular report

    Hi @BFuchs Your code is not working for all rows since you are generating several items with the same id "myLink", remember each id must be unique. Could you please identify a field within the table which is unique so I can provide you with the proper JS? Tell me the full name of the unique field.
  28. 1 point
    Hello Two weeks ago, I was wondering if we can make a submission form with a distance search. What we are trying to do is basically make a text-field where the user will input his or her location then there will be a dropdown button or list which only contains locations in our record which is within 30 miles from the user. We thought we can make via cascading element. However, after a short communication with the support, they informed us that It is not possible do that via dropdown. I found an alternative workflow though. First, I made a Data Page with a distance search. The user will have to input their location via zipcode then it will return all records within 30 miles from it on the results. Then I passed this value as a parameter on my submission form via link. It is working fine for for us now but its kinda lot of work plus it cost us two data pages for a single process. I hope if help others but please comment if you have a better idea in mind. quack
  29. 1 point
    NEVER MIND. I figured it out. Fun fact, not all zip codes exist. Since I was doing an INNER join using a Zipcode/Latitiude/Longitude table, my triggered action would exclude data that didn't have a matching zip code in the joined table. Some of the random zip codes I came up with to test with simply weren't needed when allocating zip codes for the United States. Because of this, they were getting excluded from the join. So, there was, in fact, nothing wrong with the WHERE clauses or the triggered action, just the data I was using.
  30. 1 point
    Yolanda

    data transfer

    Hi Vitalikssssss - I didn't find the answer I just want to know how much data is used by every search? Is that calculated by the size of the records? p.e. if by a search I get 20 records as result does that count as more data transfered then if the result is only one record?
  31. 1 point
    kpcollier

    Conditional DataPage Display

    Hey @mgredmond, Check out this post. I think it'll help you out.
  32. 1 point
    Ed727

    Back button in Multi Step Form

    Another way to try it... If you didn't want the first form to actually make a submission to your table, you could set up that first form as virtual fields an then pass the entries to the second form as parameters. The second form would then receive those parameters and enter them into the actual entry fields, which you'd hide (since the user has already "entered" them in the first form). When the user fills out the new fields he/she sees in the second form, the entries for both the first and second form are then entered into your data table in one go. To enable a user to go back to the first form prior to submitting the second form, create the back button as an actual link back to the first form, (or try the back button javascript) and set up the first form to also receive parameters so that it "catches" the same parameters it sent to the second form. This then pre-populates the fields in the first form with the info the user already put in. One complication is ensuring that that you don't run into a situation where old parameters are sitting around and appearing in the first form's field uninvited. You can use the ?cbResetParam=1 when first directing the user to the first form, which will clear any parameters before the user sees the form. However, if you do this, the link from the second form to the first form will need to be a url link that doesn't have this parameter clearing instruction. If you use the javascript "back" button, it's the same as hitting the browser back button and the first form page url will still have the ?cbResetParam=1 which will clear the entries. I have not tested this approach for your use, but I've used a similar setup for another purpose.
  33. 1 point
    SunakoChan

    Letter-Style DataPage

    Hi @kpcollier, Have you tried the format that I have provided you on the other post, they are pretty the same:
  34. 1 point
    Hastur

    Multi Step Form Customization

    Hello @kpcollier You can implement a similar workflow if you create datapages "on the fly". It can be done if your datapages use AJAX. All datapages are AJAX by default. First of all, you should create a wrapper div where you will load a new step datapage. On each step of submission, you need to define the custom event to clear wrapper and load new datapage. This event should be fired on click of next/prev buttons. Example of the function: function createPage() { var dataPage = document.createElement('script'); dataPage.src = 'https://your_domen.caspio.com/dp/your_app_key/emb?param1=' + val1 + '&param2=' + val2; document.getElementById('wrapper').appendChild(dataPage); }
  35. 1 point
    Vitalikssssss

    Make JS Work With Empty Fields

    Hi @kpcollier, Try this code: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let v_fields = ["Labor1_Rate", "Labor1_Hours", "Labor2_Rate", "Labor2_Hours", "Labor3_Rate","Labor3_Hours", "Labor4_Rate", "Labor4_Hours", "Labor5_Rate", "Labor5_Hours", "Labor6_Rate", "Labor6_Hours", "Labor7_Rate", "Labor7_Hours", "Labor8_Rate", "Labor8_Hours", "Labor9_Rate", "Labor9_Hours", "Labor10_Rate", "Labor10_Hours", "Labor11_Rate", "Labor11_Hours", "Labor12_Rate", "Labor12_Hours", "Labor13_Rate", "Labor13_Hours", "Labor14_Rate", "Labor14_Hours", "Labor15_Rate", "Labor15_Hours", ]; let t_field = ["Labor1_Total", "Labor2_Total", "Labor3_Total", "Labor4_Total", "Labor5_Total", "Labor6_Total", "Labor7_Total", "Labor8_Total", "Labor9_Total", "Labor10_Total", "Labor11_Total", "Labor12_Total", "Labor13_Total", "Labor14_Total", "Labor15_Total",]; let sub_total = document.getElementById("InsertRecordLabor_SubTotal"); sub_total.value = 0; let v_state = []; let t_state = []; v_fields.forEach(function(el) { if (el !== null) { v_state.push(document.getElementById("InsertRecord"+el)); } }); v_state.forEach(function(el){ if (el !== null) { el.addEventListener("keyup", calculate); } }); t_field.forEach(function(el) { if (el !== null) { t_state.push(document.getElementById("InsertRecord"+el)); } }); function calculate() { let i = 0; t_state.forEach(element => { if (element !== null) { element.value = ((!isNaN(v_state[i].value)) ? v_state[i].value : 0) * ((!isNaN(v_state[i+1].value)) ? v_state[i+1].value : 0); sub_total.value = +sub_total.value + +element.value; console.log(sub_total.value); i+=2; } }); } }); </script> This code should resolve the issue. Regards, Vitalikssssss
  36. 1 point
    Hi @kpcollier-Try this, just enable the source then paste it: <div style="text-align: center;"><span style="font-size:14px;">Capital Glass, Inc.<br /> SM Bid / Work Order</span> <hr /><span style="font-size:14px;"><br /> Job/Customer Name: _________________________________________ Phone #: _______________________<br /> Contact Name: ______________________________________________ Phone #: _______________________<br /> Fax Number: ______________________________________ E-Mail: __________________________________<br /> Job Address: ________________________________ City: __________________ St:________ Zip:__________<br /> Bill To (if different from above):_________________________________________________________________<br /> Billing Address: _____________________________ City:__________________ St:_________ Zip:__________<br /> PO #: ________________&nbsp; &nbsp;Warranty:______________&nbsp;&nbsp; Order Date:________&nbsp;&nbsp;&nbsp; Estimator: _______________</span><br /> &nbsp; <center>&nbsp; <table align="center" border="1" cellpadding="1" cellspacing="1" style="height:300px;width:700px;"> <tbody> <tr> <th scope="row">Quantity</th> <td style="text-align: center;">Size</td> <td style="text-align: center;">Description</td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> <tr> <th scope="row"></th> <td></td> <td></td> </tr> </tbody> </table> <span style="font-size: 12pt;"></span></center> <center style="text-align: left;"> <center style="text-align: justify;"><span style="font-size:12.0pt;"></span><span style="font-size:12.0pt;"></span><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"></span></span></span></span></center> <center><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"><span style="font-size:12.0pt;"><br /> Labor hours to be billed:</span>_______________________________________________&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></span></span></center> </center> <center style="text-align: center;"><span style="font-size:12.0pt;"> </span></center> <center style="text-align: justify;"></center> <center style="text-align: center;"><span style="font-size:12.0pt;">Scope of work:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br /> ______________________________________________________________________________<br /> ______________________________________________________________________________</span><br /> <br /> <span style="font-size:12.0pt;">Comments:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> ______________________________________________________________________________<br /> ______________________________________________________________________________</span></center> </div> Here is the actual result in preview: Here is the actual result in PDF:
  37. 1 point
    Vitalikssssss

    Set Check box with a formula?

    Hi @scottd, Here is a topic with a solution: Hope this helps Regards, vitalikssssss
  38. 1 point
    How can I format the Name in a reverse order by displaying first the first name instead of Last Name. My table has client' last name and first name in the same field, listed with last name first, with a comma, ie, Balot, Kevin. I want to reverse the name, keep them in one field, but put first names first, with no comma, ie, Kevin Balot Is there a way to do that automatically so I don't have to make the changes manually?
  39. 1 point
    Barbie

    Centered Report Search

    Hi @joneslovescaspio, You can add the center tag and the close tag of center in the header and Footer. So basically, in your header, you need to paste this <center> <style> table[class*="cbFormTable"] { border: none !important; background: white; } </style> and in the footer just paste the end tag of center. </center> Please note that I just added a sample design for your search form using CSS. You can also change that based on what design you prefer. Hope it works. -Barbie
  40. 1 point
    WatashiwaJin

    The week for the month

    Hi @FinTheHuman - In addition for the earlier response, you can also use this formula to get the week number with the corresponding month via DataPage level: CASE WHEN (DatePart(day, DateDiff(day, 0, [@field:DATE])/7 * 7)/7 + 1) = 1 THEN 'Week 1 of ' + (DATENAME(month, [@field:DATE])) WHEN (DatePart(day, DateDiff(day, 0, [@field:DATE])/7 * 7)/7 + 1) = 2 THEN 'Week 2 of ' + (DATENAME(month, [@field:DATE])) WHEN (DatePart(day, DateDiff(day, 0, [@field:DATE])/7 * 7)/7 + 1) = 3 THEN 'Week 3 of ' + (DATENAME(month, [@field:DATE])) WHEN (DatePart(day, DateDiff(day, 0, [@field:DATE])/7 * 7)/7 + 1) = 4 THEN 'Week 4 of ' + (DATENAME(month, [@field:DATE])) ELSE 'Week 5 of ' + (DATENAME(month, [@field:DATE])) END ~WatashiwaJin~
  41. 1 point
    BaySunshine

    Select Distinct Records

    Hi @bbeshlian, The solution for this issue is to use a table which has ID field marked as unique field in the table. Use this field as the data source of your report DataPage. To show the rest of the fields in the report, use calculated fields with SQL queries to query the view based on the same ID value. Be sure to include a Where condition which will help only pull a certain record for the respective ID value. When using a view in the calculated field, add '_v_' to the name of the table like shown below: select field_name1 from _v_viewname where field_name2='..........' I hope that helps. Regards,
  42. 1 point
    MayMusic

    Phone number Formatting

    In this link, you can find how to refer to an element on different DataPage types
  43. 1 point
    Hello. You must be looking for Formula Fields or Triggered Actions. https://howto.caspio.com/tables-and-views/data-types/formula-fields/ https://howto.caspio.com/tables-and-views/triggered-actions/ If the Calculated Field is processed using the other fields on the same record, you may use Formula Field. Otherwise, if you are referencing to data outside the row/record, you'd need to use a Triggered Action.
  44. 1 point
    JolliBeng

    Input Time

    Hi @Role21, Yes, Caspio does not have a time picker option. What you can do is separate the input fields for your date and time fields. That will require some javaScript, you may refer to this Tech Tip for more details. You may also check this sample Time Sheet Web Form. -JolliBeng
  45. 1 point
    @Scott Hello! Your trigger should consist of two part. First one will insert the entry into the log table if the log table does not contain the ID of a particular entry. The second will update the needed entry if it is already present within the log table. Please find the app with the example attached : FORUM_Trigger_Insert_Update_Based_on_Presence_1_0_2019-Jun-19_0714.zip
  46. 1 point
    DesiLogi

    Bulk Edit Auto-Submit

    Hi, Does anyone know how to put code in the footer of a Bulk Edit form so it auto-submits (so the user doesn't have to click the Update button)? This code: <script type="text/javascript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } </script> works only on a regular Update or Submission form. If you use it in Bulk Edit it just keeps refreshing the records over and over. So there must be some specific code for Bulk Edit. As well, if I can get Bulk Edit to auto-submit I'd like to remove he Update button so if anyone has code for that it'd be really great. Thanks!
  47. 1 point
    hctrr

    Redirect user if not logged in

    For anyone trying to accomplish this it is really easy. No need to use the method on the link posted above. Just open your authentication object in Caspio Bridge and expand the Advanced settings. Then set the Timeout option to Other Webpage and enter your standalone login page location. Then once your dashboard/main app page has at least one datapage that requires authentication and the user is not logged in they will be redirected to your standalone login page.
  48. 1 point
    I thought this might be helpful across the board for people developing in Caspio. I've been trying to do a better UI for data entry on web pages that also have to show results in a tabular report. Since iframes don't reliably pass parameters from parent to child and back it's necessary to sometimes deploy 2 datapages (a Submit or Details and a Tabular) on the same web page. This doesn't really look good from a UI perspective. This solution requires using bootstrap and jquery but it's fairly straightforward. One option is to put the the Submit/Details deploy code in the first div with something like class="col-md-3" and the Tabular deploy code in the next div with class="col-md-9" (divs in bootstrap with col classes must add up to 12 but no more than 12, in basic mode). This will put the 2 datapages next to each other, the 1st with 1/4 screen width and the 2nd with 3/4th. However, this setup looks cluttered and can constrain the Tabular report which often needs full page width to show its data clearly. So the ideal would be to onload hide/collapse the first div (with the Submit/Details form) and have the second div (tabular report) a full 12 columns wide. Then click a button or link to show the 1st div (Submit form) and change the 2nd div (tabular report) to 9 columns, thereby displaying both datapages when data entry/edit is needed. Clicking the button/link again (in this method) will collapse div1 and expand div2 back to 12 columns. So it's easy to toggle views this way. To do this: Put this in the body of your webpage (you may have bootstrap and jquery referenced differently): <div class="container-fluid"> <br> <div class="row"> <div class="col-md-3 bg-faded"> <div id="showsubmitform" class="collapse"> Caspio Deploy Code for Submit/Details form </div> </div> <div class="col-md-12" id="right"> <div> Caspio Deploy Code for Tabular Report </div> </div> </div> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script> $('#btnSwitch').click(function(){ $('.col-md-3').toggleClass('show'); $('#right').toggleClass('col-md-9 col-md-12'); }) </script> And then put a button or link elsewhere on your page, wherever you want to show it: <a class="btn page-action" id="btnSwitch" href="#showsubmitform" style="color:green;" data-toggle="collapse"><i class="fa fa-plus" aria-hidden="true"></i> Submit New Data</a> When the page is loaded the Tabular Report will be the only datapage showing, in full width. When the 'Submit New Data' link is clicked the Tabular Report moves to the right and shrinks to 9 columns from 12. The space that opens on the left is 3 columns wide and will now show the Submit/Details form. When the 'Submit New Data' link is clicked again it will hide the Submit/Details form and expand the Tabular Report back to 12 full columns. You can change the column numbers of the divs and button ids and labels to suit. This solution might help with some UI massaging, if anyone is working on that aspect of their app...
  49. 1 point
    Got an answer to my question (Thanks so much Francis!) I got confirmation that the "Social Login Field" is not the same as the account name or the email address. For example, the Google social login field is a text string that resembles the following: "Google:123456789012345678901" Where it's the word "Google:" followed by a 21-digit number that uniquely identifies the Google account. There is a specific set of steps necessary to obtain that information which is not yet documented on the Caspio Support site. As soon as I have a chance I will append the instructions here in case anyone else ever needs to do this as well. However, the unfortunate problem is that this doesn't actually allow the desired results to be accomplished (specifcially: limiting access to a DataPage to specific Google users only by using "ID Service only"). This is because the method that is required to obtain the Google social login field is initiated by the google user, so it can't directly be used to create a list of allowed users because this causes a catch-22 situation where the Caspio admin/developer can't know the ID Service social login field without allowing the new user to login first, and once they do so, they are automatically added to the authentication data source. Therefore you basically need to allow access to all google users in order to get their unique social id which would be used to limit their access. Classic chicken & the egg dilemma. But I have an idea for how to avoid that conundrum and am working on implementing it now. Hopefully it will work...
  50. 1 point
    Ariel

    Multiple Fields in a Dropdown

    Hi EIQ, you can use Formula Field feature to create a field that would save the data from both First Name and Last Name fields. This article has an example: http://howto.caspio.com/tables-and-views/data-types/formula-fields/ You can then use the formula field as field for Display and for Value in the drop down.
×
×
  • Create New...