Jump to content

Jan

Caspio Evangelist
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    35

Everything posted by Jan

  1. Hello artdocent, Yes, you can customize messages. Edit the Localization that is assigned with your DataPage, enter "duplicate" to the Search field, select Everything in the next dropdown box. Then you can enter your text in the Custom Text field and save changes. There is an article, part 4: Personalize your DataPage messages.
  2. I think, it is better to create a function. You can try the following code: <SCRIPT LANGUAGE="JavaScript"> function replacing(text) { text = text.replace(/\n/g, "</li>\n<br/><li>"); text = "<ul><br/><li>"+text+"</li></ul>"; return text; } function textReplace() { document.getElementById("InsertRecordtest1_2").value = replacing(document.getElementById("InsertRecordtest1_1").value); document.getElementById("InsertRecordtest2_2").value = replacing(document.getElementById("InsertRecordtest2_1").value); } document.getElementById("caspioform").onsubmit=textReplace; </SCRIPT> I have used two lines like following for every pair of fields, but you can use as many, as you want: document.getElementById("InsertRecordtest1_2").value = replacing(document.getElementById("InsertRecordtest1_1").value);
  3. I am sorry, this alert allows me to check that tags are inserted. Please try this code: <SCRIPT LANGUAGE="JavaScript"> function textReplace() { var text = document.getElementById("InsertRecordtest1").value; text = text.replace(/\n/g, "</li>\n<br/><li>"); text = "<ul><br/><li>"+text+"</li></ul>"; document.getElementById("InsertRecordtest2").value = text; } document.getElementById("caspioform").onsubmit=textReplace; </SCRIPT>
  4. Hello freshstart, If I understand correctly, you can add an HTML block to your table on the Report DataPage and display the parameter that is used for search in this HTML block. Does it work for you?
  5. Hello jwilgus, If I understand correctly, you enter results of a game to your Game Schedules table, and you want to update records in your Team table. I think, you can add Virtual Hidden fields to your Submission form - ids of teams and results for every team. Then you can use a JavaScript like this to calculate what Team wins and what Team loses and insert this data to correspond Hidden fields. Then you can pass the parameters to another Submission form and use auto-Submit. If I understand correctly, this form updates results for the first team - and you can pass parameters to a Submission form that updates results for the second team. I hope it helps.
  6. Hello ccarls, If I understand correctly what you want, you can add a Header&Footer element and enter to the Footer the code like following: <SCRIPT LANGUAGE="JavaScript"> function textReplace() { var text = document.getElementById("InsertRecordtext64000").value; text = text.replace(/\n/g, "</li>\n<br/><li>"); text = "<ul><br/><li>"+text+"</li></ul>"; document.getElementById("InsertRecordtext64").value = text; } document.getElementById("caspioform").onsubmit=textReplace; </SCRIPT> Please, enter your fields instead of InsertRecordtext64000 and InsertRecordtext64. When a user enters a text to the InsertRecordtext64000 field and press Submit, the text is copied, tags are inserted to it and the text with tags is pasted to the InsertRecordtext64 field. You can use this field in the email. If I understand wrongly, please correct me. P.S. I have edited this code too.
  7. Hi mbogen, If I understand correctly, you can create a Submission form with only one Virtual field, that will pass the value as the parameter to your Single Record Update form. This Submission form will not update any table, only pass the parameter. There is the article with instructions on how to do this. I hope it helps.
  8. Hello Duncan, If I understand correctly, you can use the auto-submit code to "press" the button in the Store Locator app. Does it work for you?
  9. Hello ccarls, Do you want to insert tags after the form is submitted? And do you want to insert tags at the beginning of each line? Or how do you define the beginning of the sentence? In this case, if I understand correctly, the tags should be inserted after every dot. Is it correct?
  10. Hello mbogen, As far as I know, the problem is not with settings of the filed on the Configure Fields step. If you do not want to edit the field, you can do not select the field on the Select Fields step. Maybe, the parameter has incorrect format. The Record is displayed, if the id of the record is the same as the parameter, for example, 1. Please try to use the number in your URL, like "URL?CAN=1" If the Record will be displayed, please make sure that format of your filed 1fX1z0rK is number-integer. If the format is number -general, the value maybe "1.00" and the record is not displayed. As far as I know, it the better to pass parameters without URL, if it works for you.
  11. Hello pmilkumar, Can you say more details about your goal? Maybe, the following article can help: how-to-add-a-required-i-agree-option-to-your-form
  12. Hello mbogen, Do you use the URL like "URL&CIN=1"? You can read more details about passing parameters with URL. Also, on the Single Record Update step, "[@CIN]" should be entered in the Parameter name field. I hope, it helps.
  13. Hello, As far as I know, you can use a Totals & Aggregations field and use the COUNT NOT BLANK function. Does it work for you?
  14. Hello Mel, Do you want to hide cells, records or columns? To hide records, you can use a View and the Is Not Blank filter. To hide columns, you can use the last script (that should be placed in the Footer) from this topic. I hope, it helps.
  15. Hello Mel, If I understand correctly, you can use the following code: <SCRIPT LANGUAGE="JavaScript"> function add() { var is_checked = document.getElementById("cbParamVirtual1").checked; if (is_checked) { var totalVal = parseInt(document.getElementById("EditRecordR393_Kip_met_Marrokaanse_kruiden").value); totalVal = totalVal + 1; document.getElementById("EditRecordR393_Kip_met_Marrokaanse_kruiden").value=totalVal; } } document.getElementById("caspioform").onsubmit=add; </SCRIPT> And it requires set the field R393_Kip_met_Marrokaanse_kruiden as Hidden, select Data Source Fields in the On load assign drop down box, and selet your field in the next drop down box. I hope, it helps.
  16. Hello Mel, As far as I know, you can add the data to two and more tables. You can create another DataPage based on the other table and have it as the destination after submission. Check to receive the parameters that need to be passed to this page and received them on the new page. On the second DataPage you can use an auto-submit DataPage. Then you can create a Chart DataPage that uses this second table. Does it work for you?
  17. Hello freshstart, As far as I know, you cannot use "if" on the Report page to check whether the parameter is empty. I tried several ways, but they all failed. And you should pass the empty parameter to find all values, so, I think, the best way is to use two parameters: one will be used in the search and the second will be displayed in the HTML block. Also, you can display a Search Interface and a Results Set page on the one page.
  18. Hello Aukirk, And one more thing - as far as I know, it is requires some additional code to find the cascading field by ID. So, if you work with a not cascading field and want to change, for example, color of the field, you can use the following code: <script type="text/javascript"> var textfield = document.getElementById("InsertRecordFIELDNAME"); textfield.style.color="#ff0000"; </script> But if the field is cascading, the following code will work: <script type="text/javascript"> var elems = document.getElementsByTagName("*"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].id && elems[i].id.indexOf("InsertRecordFIELDNAME") != -1) { var textfield = elems[i]; } } alert(textfield); textfield.style.color="#ff0000"; </script>
  19. Hello streetsmart, If I understand correctly, the feature is not available yet. The completed features are marked with the Completed label. But if you vote for this feature it probably will be completed faster.
  20. Hello freshstart, If I understand correctly, you can use a JavaScript code to pass the value of the selected item. Please follow the next steps: Add a Virtual field to your Submission form, and then select Hidden in the Foem element dropdown; Pass the value of this Hidden Virtual filed as parameter; Add the Header&Footer element to your Submission form and enter the following code to the Footer: <SCRIPT LANGUAGE="JavaScript"> function insert_parameter() { var selected = document.getElementById("InsertRecordDROPDOWN"); var value_parameter = selected.options[selected.selectedIndex].text; document.getElementById("cbParamVirtual1").value = value_parameter; } document.getElementById("caspioform").onsubmit=insert_parameter; </SCRIPT> Please enter the name of your field instead of DROPDOWN in the InsertRecordDROPDOWN. If the name of your Hidden Virtual field is not Virtual1, then enter the number of your Virtual field instead of 1 in cbParamVirtual1. On the Report DataPage use the passed parameter in your HTML block. I hope it helps.
  21. Hello Allen, The data usually is refreshed after an updating. Did you try press "F5 and CTRL" to clear cache? Do you use any RLS on the DataPage?
  22. Hello spearheading, As far as I know, it is impossible to hide parameters that are passed by external query string. Maybe, can you pass parameters from one DataPage to another? In this case, parameters are not displayed in the address.
  23. Hello jeffs88keys, It seems, I have found a solution. The idea is: On the Select Search Fields page, add the field with dates. On the Configure Search Fields, add a New Criteria and check the AND radio-button. Set the "Greater Than or Equal" Comparison Type for the first criteria and "Less Than or Equal" one for the second criteria. Add the Java Script code that hide the Search form, enters Today + 180 to the first field, Today + 210 to the second, and then autosubmit the Search. To hide the Search Form, add a Header&Footer element, enter to the Header the following code: <div align="center"> <p>Processing...</p></div> And enter the following code to the Footer: <SCRIPT LANGUAGE="JavaScript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; var nDate = new Date(); var base_day = nDate.getDate(); var first_day = base_day + 180; var first_date = new Date (nDate.setDate(first_day)); var d_month = first_date.getMonth() + 1; if (d_month<10) {d_month = "0" + d_month;} var d_day = first_date.getDate(); if (d_day<10) {d_day = "0" + d_day;} var d_year = first_date.getFullYear(); var str_date = d_month + "/" + d_day + "/" + d_year; document.getElementById("Value1_1").value=str_date; var sDate = new Date(); var last_day = base_day + 210; var last_date = new Date (sDate.setDate(last_day)); d_month = last_date.getMonth() + 1; if (d_month<10) {d_month = "0" + d_month;} d_day = last_date.getDate(); if (d_day<10) {d_day = "0" + d_day;} d_year = last_date.getFullYear(); str_date = d_month + "/" + d_day + "/" + d_year; document.getElementById("Value1_2").value=str_date; setTimeout('document.forms["caspioform"].submit()',1000); } </SCRIPT> Please note, that Value1_1 and Value1_2 will be correct if only two criteria are present on the "Configure Search Fields" step. And I am not sure that dates should be like "Today + 180 days", so the following code insert dates like "Today + 6 months" and "Today + 7 months": <SCRIPT LANGUAGE="JavaScript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; var nDate = new Date(); var base_month = nDate.getMonth(); var first_day = base_month + 6; var first_date = new Date (nDate.setMonth(first_day)); var d_month = first_date.getMonth() + 1; if (d_month<10) {d_month = "0" + d_month;} var d_day = first_date.getDate(); if (d_day<10) {d_day = "0" + d_day;} var d_year = first_date.getFullYear(); var str_date = d_month + "/" + d_day + "/" + d_year; document.getElementById("Value1_1").value=str_date; var sDate = new Date(); var last_day = base_month + 7; var last_date = new Date (sDate.setMonth(last_day)); d_month = last_date.getMonth() + 1; if (d_month<10) {d_month = "0" + d_month;} d_day = last_date.getDate(); if (d_day<10) {d_day = "0" + d_day;} d_year = last_date.getFullYear(); str_date = d_month + "/" + d_day + "/" + d_year; document.getElementById("Value1_2").value=str_date; setTimeout('document.forms["caspioform"].submit()',1000); } </SCRIPT>
  24. Hello Martin, Maybe, can you display a Search Interface and a Results Set page on the one page? There is the article with details how to do it.
×
×
  • Create New...