Jump to content

KlisaN137

Caspio Ninja
  • Posts

    27
  • Joined

  • Last visited

  • Days Won

    6

KlisaN137 last won the day on November 30

KlisaN137 had the most liked content!

Recent Profile Visitors

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

  1. Hi @JenKri So, you are having a Submission Form, on which the user is selecting the Chapter number, and you want that to be used in making this autonumber which will essentially be unique record ID? As I see it, the best option is to use Triggered Action to do this, so something like on the following Post:
  2. Hi @MarkMayhrai, In order to prevent submission you may check the following Forum Post: As the autosubmit part, I'm guessing you are using JS from the page: To prevent submission if there is an error in Form, you may use this code instead: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { const error = document.querySelector('div[data-cb-name="HeaderErrorMsg"]'); if(!error){ if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } } }); </script> I'm not sure how are you checking if the entry is a duplicate? What is the indication that some record is duplicate?
  3. @jbloome for implementing it on Details, instead of 'InsertRecordFIELDNAME', you must use 'EditRecordFIELDNAME', and place the code not in the Footer of the page, but add a new HTML block element just after all other elements, and put the code there. Also, additional event listener is needed, here is the entire code: <script> document.addEventListener('DataPageReady', function (event) { const fields = ['EditRecordPhone1','EditRecordPhone2', 'EditRecordPhone3']; const inputs = []; for (let f of fields){ inputs.push(document.querySelector('#' + f)); } for(let i of inputs){ i.maxLength = 14; i.onkeyup = telephize; i.onkeydown = telephize; } function telephize(v_e) { // this.value = this.value.replace( /\D+/g, "" ).replace( /([0-9]{1,3})([0-9]{3})([0-9]{4}$)/gi, "($1) $2-$3" ); //mask numbers (xxx) xxx-xxxx v_e = v_e || window.event; if (v_e.keyCode >= 65 && v_e.keyCode <= 90) { this.value = this.value.substr(0, this.value.length - 1); return false; } else if (v_e.keyCode >= 37 && v_e.keyCode <= 40) { return true; } var v_value = (this.value.replace(/[^\d]/g, '')); if (v_value.length == 7) { this.value = (v_value.substring(0, 3) + "-" + v_value.substring(3, 7)); } else if (v_value.length == 10) { this.value = ("(" + v_value.substring(0, 3) + ") " + v_value.substring(3, 6) + "-" + v_value.substring(6, 10)); }; } document.querySelector('#caspioform').onsubmit = function(e) { e.preventDefault(); if (input.value.length >= 14){ this.submit(); } else { alert('Please input a valid phone number'); input.focus(); } } }); </script>
  4. Hi @telepet If it is a Tabular Report, I'm guessing you want this on Details Page? Yes, you need to adjust Element ID, in this case, where you see 'EditRecord' and 'Remove', just follow the same logic. Also, add another part to get rid of the label 'remove': <script> var UploadA='[@field:FIELDNAME]'; if (UploadA.length>0) { document.getElementById("EditRecordFIELDNAME").style.visibility = 'hidden'; document.getElementById("EditRecordFIELDNAMERemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordFIELDNAMERemove"]').style.visibility = 'hidden'; } </script> Please instead of using the code in the Footer of the page, add another HTML block element just after the last element, and put the code in it, this will execute code again when the file is uploaded after using Update button.
  5. @telepet Could you elaborate a bit more about the DataPage setting? What is the DataPage Type on which you are using this?
  6. 1) You can store picture files, and just reference it on a DataPage, it will be shown as picture: https://howto.caspio.com/files-and-images/uploading-files-and-images/ 2) If you are storing quotes in table with fields quote and date, so every quote is having the corresponding date, you could use Calculated Value to find the right quote based on the date: SELECT Quote FROM Quotes WHERE Date = CONVERT(DATE, SysUTCDateTime()) 3) For setting a background, please check the following articles: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-dynamically-change-the-background-of-a-results-page https://howto.caspio.com/faq/styles-and-localization/how-to-use-an-image-as-form-background/ https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/customize-background-and-font-colors-in-report-datapage/
  7. Hi @Miguel, From which table is the above screenshot, with additional fields, TableD?
  8. Hi @jbloome and @Meekeee We can also use arrays and loops to further reduce the code: <script> const fields = ['InsertRecordPhone1','InsertRecordPhone2', 'InsertRecordPhone3']; const inputs = []; for (let f of fields){ inputs.push(document.querySelector('#' + f)); } for(let i of inputs){ i.maxLength = 14; i.onkeyup = telephize; i.onkeydown = telephize; } function telephize(v_e) { // this.value = this.value.replace( /\D+/g, "" ).replace( /([0-9]{1,3})([0-9]{3})([0-9]{4}$)/gi, "($1) $2-$3" ); //mask numbers (xxx) xxx-xxxx v_e = v_e || window.event; if (v_e.keyCode >= 65 && v_e.keyCode <= 90) { this.value = this.value.substr(0, this.value.length - 1); return false; } else if (v_e.keyCode >= 37 && v_e.keyCode <= 40) { return true; } var v_value = (this.value.replace(/[^\d]/g, '')); if (v_value.length == 7) { this.value = (v_value.substring(0, 3) + "-" + v_value.substring(3, 7)); } else if (v_value.length == 10) { this.value = ("(" + v_value.substring(0, 3) + ") " + v_value.substring(3, 6) + "-" + v_value.substring(6, 10)); }; } document.querySelector('#caspioform').onsubmit = function(e) { e.preventDefault(); if (input.value.length >= 14){ this.submit(); } else { alert('Please input a valid phone number'); input.focus(); } } </script>
  9. Hi @kcastagnaro, Did you also joined (in the table variable level) Nurse ID (or name) from user table with the field that represent Nurse ID in the screening table?
  10. Hi, @drckarcher, In order to show some field on the Form DataPage from the entry that has most recent timestamp, we can use the Virtual Field with Calculated Value with the following SQL statement: SELECT TOP(1) field_we_want_to_show FROM tbl_test ORDER BY Time_Stamp_Field DESC I'm not sure if I understand would you like to show last allocation based on some value from other field, so could you please elaborate a little bit more about the issue?
  11. @skwaler Workaround that comes to my mind is to maybe use Multipage Form? https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-create-a-multi-page-form/
  12. Hi @JenKri, In order to show only records with Status Active, you might want to make a new View to filter out active Exams, and then use that View in your Listbox element. More on filtering using Views you can find on the article: https://howto.caspio.com/tables-and-views/what-are-views/creating-a-view-to-filter-data/
  13. Hi @CoffeeLover, Thank you for explanation. As far as I can see, because the values of authentication fields are taken at the moment of login, they remain unchanged during the entire session. Only way to refresh data is starting a new session - log out and then again log in. I found this Forum thread about that also: I'm guessing that for required workflow, you might need to use additional table.
  14. Hi @CoffeeLover, To update user authentication fields, you can use Single Record Update DataPage, with the Users table as the Data Source. Then you can restrict access to the page based on Authentication: https://howto.caspio.com/datapages/forms/update-forms/ I'm not sure what do you mean by "How can I have the users authfields updated if changed? (without them logging off and loggging back in)", could you specify a little bit more?
  15. @skwaler As I checked, it may not be possible to update the parent DataPage when data from it are updated on the separate pop up page. Refer to the below Posts: It is possible to refresh the page at some time interval, but I suspect that is not the intended workflow here... Have you considered using Inline Edit or Grid Edit on your Report DataPage instead of pop up? That way, if records are edited, the DataPage is updated. Please refer to the: https://howto.caspio.com/datapages/reports/data-editing-options-in-reports/ Anyway, I will continue to look onto this issue, and will update here if I find something.
×
×
  • Create New...