Jump to content

Jan

Caspio Evangelist
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    35

Everything posted by Jan

  1. Hi Elena, I apologize for delay with the answer You can try the following formula: CASE WHEN CAST([@calcfield:2] AS Integer) = CAST([@field:Grade] AS Integer) THEN [@field:Week_Pay] ELSE 0 END Does it work for you?
  2. Hello Peco, In the article, they say: For Deployed DataPages: While the DataPages and applications you create using Caspio Bridge are compatible with all common browsers and operating systems (Windows, Mac OS, iOS, and Android), we recommend using our browser requirements above to ensure full functionality and performance. For Bridge (admin part): Please note that while you may be able to sign into Caspio Bridge with unsupported browsers, we highly recommend that you adhere to the above system requirements to ensure full product functionality, optimal user experience, and access to technical support.
  3. Hello Peco, As far as I know, only Windows, Mac OS, iOS, and Android are fully supported. You can use the "User Agent Switcher" plugin for firefox (https://addons.mozilla.org/en-US/firefox/addon/59/) Steps to login to Caspio Bridge from Linux: Go to the Tools menu in Firefox Select Default User Agent. Edit User Agents. Click New. Click New User Agent. A dialog box will appear and you can enter the information: Description: Firefox Windows User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Geko/20100401 App Code Name: Mozilla App Name: Netscape App Version: 5.0 (Windows; en-US) Platform: Win32 Vendor: empty Vendor Sub: empty Click Ok. Go back to the Tools menu Select Default User Agent Click Firefox Windows. I hope, it helps.
  4. Hello JaredL, As far as I know, it's impossible to enter a value in the file field with JavaScript due to security reasons. And parameters cannot be received. You can use a text field and store the value, than on DataPages you can try to work with this value as with file, but I am not sure that it works.
  5. Hello naidah14, Maybe, conditions in Calculated fields can help. Does it work for you?
  6. Hello crazedwombat, What page do you want to use? Result page or Details page? If I understand correctly, you want to click a link or button, then the record is "moved" to another table. Is it correct?
  7. Hello nhunsaker, Welcome to Caspio Forum! As far as I know, you can send Views and Tables with Scheduled Export Tasks. Does it work for you?
  8. Hello Elena, Maybe, you can use a standard feature: to perform calculations in DataPage based on a conditional or IF, THEN, ELSE statement using Calculated Fields. I hope, it helps.
  9. Hello larsonchst, You can try setting the "Number" type for the field with the following code: (You can add an Header&Footer element to your Submission Form, select the Footer element, click the Source button and enter the code) <SCRIPT LANGUAGE="JavaScript"> document.getElementById("InsertRecordFIELDNAME").setAttribute("type", "NUMBER"); </SCRIPT> Please, enter the name of your field instead of "FIELDNAME". I hope, it helps.
  10. Hi Elena, As far as I know, if "onsubmit" is used more than one time, only the first "onsubmit" works. You can rewrite the whole code as well: <script> function trim_func() { var task1 = parseFloat(document.getElementById("EditRecordDuties_Task1_Time").value); var task2 = parseFloat(document.getElementById("EditRecordDuties_Task2_Time").value); var total = task1 + task2; total = Math.round(total); var result = total + "%"; document.getElementById("EditRecordTotalTaskTime").value = result; var fieldname = "Job_Purpose"; var fieldname1 = "Duties_Task1"; var fieldname2 = "Duties_Task2"; fieldname = "EditRecord" + fieldname + fieldname1 + fieldname2; var entered_text = document.getElementById(fieldname).value; var entered_text = document.getElementById(fieldname1).value; var entered_text = document.getElementById(fieldname2).value; var n = 1; for (i=0;1<100;i++) { n = entered_text.indexOf("\n\n"); if(n>-1) entered_text = entered_text.replace("\n\n","\n"); else break; } document.getElementById(fieldname).value = entered_text; document.getElementById(fieldname1).value = entered_text; document.getElementById(fieldname2).value = entered_text; } document.getElementById("caspioform").onsubmit=trim_func; </script> I hope, it works.
  11. Hi Elena, Please try the following code: function calculate() { var task1 = parseFloat(document.getElementById(“EditRecordDuties_Task1_Time").value); var task2 = parseFloat(document.getElementById(“EditRecordDuties_Task2_Time").value); var total = task1 + task2; total = Math.round(total); var result = total + "%"; document.getElementById(“EditRecordTotalTaskTime").value = result; } document.getElementById("caspioform").onsubmit=calculate;
  12. Hello Don, Welcome to Caspio Forum! As far as I know, you can use a View and filter your data by this field. Does it work for you?
  13. Hello Cameron, You can follow the following steps (it is not an easy solution, but I do not know a better one): Add a field to your table, name it, for example, "latin_text". Here text without Spain characters will be stored. Edit your Submission Form, add a Header&Footer element, select the Footer element, click the "Source" button and enter the following code: <SCRIPT LANGUAGE="JavaScript"> function latin_text() { var original_field = "original_text"; var latin_field = "latin_text"; original_field = "InsertRecord" + original_field; latin_field = "InsertRecord" + latin_field; var latin_text = document.getElementById(original_field).value; latin_text = latin_text.replace(/á/g, "a"); latin_text = latin_text.replace(/é/g, "e"); latin_text = latin_text.replace(/í/g, "i"); latin_text = latin_text.replace(/ó/g, "o"); latin_text = latin_text.replace(/ú/g, "u"); latin_text = latin_text.replace(/ü/g, "u"); latin_text = latin_text.replace(/ñ/g, "n"); latin_text = latin_text.replace(/Ã/g, "A"); latin_text = latin_text.replace(/É/g, "E"); latin_text = latin_text.replace(/Ã/g, "I"); latin_text = latin_text.replace(/Ó/g, "O"); latin_text = latin_text.replace(/Ú/g, "U"); latin_text = latin_text.replace(/Ãœ/g, "U"); latin_text = latin_text.replace(/Ñ/g, "N"); document.getElementById(latin_field).value = latin_text; } document.getElementById("caspioform").onsubmit=latin_text; </SCRIPT> Please, enter the name of your current field instead of "original_text" and the name of a new field instead of "latin_text". Now, when a user enters a text, a copy of the text without Spain characters is added to the "latin_text" field. Edit your Report DataPage, open the "Configure Search Fields" screen, add the "latin_text" field, and set the Hidden Form Element for the field; open the Logic tab and change the group "AND" to "OR". On the screen, add a Header&Footer element, select the Footer element, click the "Source" button and enter the following code: <SCRIPT LANGUAGE="JavaScript"> function look_for() { document.getElementById("Value2_1").value = document.getElementById("Value1_1").value; } document.getElementById("caspioform").onsubmit=look_for; </SCRIPT> In my screen, the "original_text" is the first field, so I used "Value1_1". The "latin_text" is the second field, and I used "Value2_1" for it. Please, enter the order numbers of your fields instead of 1 and 2, if they are different. Now, when a user enters a criteria, the text is copied to the second criteria and the text is searched in both Spain and English versions of the texts. I hope, it helps.
  14. Hi Aurora, You are right, it was not completely good code. You can use the update code (please, enter the name of you field instead of FIELDNAME and the correct number instead of "15": <SCRIPT LANGUAGE="JavaScript"> function check_date() { var field_name = "FIELDNAME"; var allowed_years = 15; field_name = "InsertRecord" + field_name; var entered_value = document.getElementById(field_name).value; var entered_date = new Date(entered_value); var entered_year = entered_date.getFullYear(); var today = new Date(); var current_year = today.getFullYear(); var denied = false; if(current_year - entered_year <= allowed_years) { if (current_year - entered_year == allowed_years) { var entered_month = entered_date.getMonth(); var current_month = today.getMonth(); if (current_month <= entered_month) { if (current_month == entered_month) { var entered_day = entered_date.getDate(); var current_day = today.getDate(); if (current_day < entered_day) denied = true; } else denied = true; } } else denied = true; } if (denied) { alert("Incorrect Birthday."); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT> I hope, it helps.
  15. Hi Aurora and piyali, I have used this generator. Please note, that the link does not work in the Preview mode. Please also note, that you should use the code as it is and click the "Source" button in your HTML Block or Header&Footer element: <a href="//pdfcrowd.com/url_to_pdf/">Save to PDF</a> You should do not change anything in the code. Could you please tell what does not work? Do you see any error message?
  16. Hello Derek, Welcome to Caspio forum! As far as I know, you can use a "Combined Chart and Report", add a Calculated field to a Table part and use this Calculated field as a source for your Chart. Does it work for you?
  17. Hi showjudge, Welcome to the Caspio forum! Could you please elaborate on your question? Do you have a Result page or a Submit page? You can use SQL queries in Calculated fields, maybe it can help.
  18. Hello aam82, As far as I know, Aggregations are sub-queries, like SELECT sum(field) FROM table WHERE criteria that are entered on the Search form. Calculated fields are also a sub-queries, like "SELECT field FROM table WHERE criteria that are entered on the Search and the correspond record" + "SELECT field2 FROM table WHERE criteria that are entered on the Search and the correspond record". So, Aggregations of Calculated fields will be like: SELECT sum ( "SELECT field FROM table WHERE criteria that are entered on the Search and the correspond record" + "SELECT field2 FROM table WHERE criteria that are entered on the Search and the correspond record". ) FROM table WHERE criteria that are entered on the Search form. As far as I know, sub-queries must be enclosed in parentheses. If only standard functions are used in a Calculated fields, Aggregations work correctly. But if you use additional Selects, parentheses are not used and the whole query is incorrect. But I am not sure that I understand all these queries and sub-queries correctly. Maybe, some additional security limits are used for Aggregation fields. Have you written the sub-query that summarize your queries and enter it in the Formula field of an Aggregation?
  19. Jan

    Edit Details Page

    Hi Amanda, Do you use a predefined Criteria on a Search page of your Report DataPage or users enter values and click the "Search" button?
  20. Hi Elena, You can try using the following code: <script> function trim_func() { var fieldname = "FEILDNAME"; fieldname = "EditRecord" + fieldname; var entered_text = document.getElementById(fieldname).value; var n = 1; for (i=0;1<100;i++) { n = entered_text.indexOf("\n\n"); if(n>-1) entered_text = entered_text.replace("\n\n","\n"); else break; } document.getElementById(fieldname).value = entered_text; } document.getElementById("caspioform").onsubmit = trim_func; </script> You can add a Header&Footer element, select the Footer element, click the Source button and enter the code. Please enter the name of your field instead of FEILDNAME. I hope, it helps.
  21. Hi Elena, I apologize for the long delay. I have tried several solution, and I have one more question - what Form Element is used for this field? If I understand correctly, it is a TextArea, but I am not sure if the "Enable rich text editing toolbar" checkbox on the Advanced tab is checked. And solutions are quite different, if the checkbox is checked and if it is not checked.
  22. Hi Elena, I am sorry for delaying with the answer. If I understand correctly, several empty lines are saved in the records. Probably, function can clear spaces but not empty lines that has special symbols for "Enters". Maybe, you can use a JavaScript code that deletes the empty lines when a user clicks the button? I can try writing the code, if you provide a bit more information: - Does the data is displayed as Text or as HTML? - Is this text entered on a Submission form or on a Single Update/Details page, or on a Result set?
  23. Hi RadhikaChopra, If I understand correctly, you can use a Single Update Form, add the password field to the Form and make the field editable. Then a user can change her password herself. There is the article about Update Forms, a Profile page is used as an example in the article. I hope, it helps.
  24. Jan

    Rules Error

    Hi benyaw616, Fields also are not displayed, if they are File Fields, Calculated Fields, CAPTCHA, and Distance Search fields, or Smart fields, such as Timestamp and Password. You can find more details about limitations of Rules in the article. I hope, it helps.
×
×
  • Create New...