Jump to content

Jan

Caspio Evangelist
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    35

Community Answers

  1. Jan's post in Dynamically Delete Rows was marked as the answer   
    Hi,
     
    I am almost did it Maybe, someone can help me with the last step.
     
    Steps:
    Create three DataPages:
    Tabular DataPage that uses the table A as the DataSource; Submission DataPage that uses the table B as the DataSource; Details DataPage, that uses the table A as the DataSource. On Tabular DataPage, add the HTML Block, disable HTML Editor and enter the code:
    <a href="URL_where_Submission_DP_is_deployed?id=[@field:id]&name=[@field:name]&surname=[@field:surname]&comment=[@field:comment]">Delete</a> You can enter the correct URL and use as many fields as you want. The "Id" field is a field with unique value. On Submission DataPage,
    add Header and Footer element, disable HTML editor for Header and Footer, enter the following code to the Header:
    <div align="center"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div> And the following code to the Footer:
    <script type="text/javascript">   if(document.getElementById("caspioform")) {   document.getElementById("caspioform").style.display = 'none';   setTimeout('document.forms["caspioform"].submit()',1000); } </script> Check for all fields "On load: Receive value or parameter" and select the "External parameter"
    Add a Virtual field, check for them "On load: Receive value or parameter", select the "External parameter" and the name of your Id parameter; check "On exit:Pass field value as parameter".
    On the Specify options to be performed after form submission screen, select "Go to a new page' and enter the URL of the page, where the third DataPage is deployed.
    On Details DataPage,
    in the "Do you need an interactive Search Form or pre-defined criteria?" screen, select "Filter data based on your pre-defined criteria";
    in the "Choose the fields you intend to use in filtering data" screen, add the "id" field to the Selected fields;
    in the "Configure the filtering criteria for each selected field" screen, on the Advacned tab, check "On load: Receive value or parameter", select the "External parameter" and the name of your Id parameter;
    in the next screen, add Header and Footer element, disable HTML editor for the Footer, enter the following code to the Footer:
    <script type="text/javascript">   if(document.getElementById("caspioform")) {   setTimeout('document.getElementById("Mod0DeleteRecord").click();',1000);} </script> in the next screen, check the "Delete record";
    in the next screen, in the "Destination after record delete" select "Go to a new page" and enter the URL of th first DataPage.
    Now, when a user clicks the "Delete" link in the HTML blank, fields are copied to table B, and a user should confirm the deletion on the Details page. If the user confirms, the first DataPage opens.
     
    I am sorry, if the solution is too complex.
  2. Jan's post in Edit Details Page was marked as the answer   
    You can open the Details DataPage in another tab. Then a user can close the tab and see the Result page.
    You can add the following setting to your link to open the Deatils page in a new tab:
    target="_blank" And you can read more about the setting in the article.
     
    Does it work for you?
  3. Jan's post in Browser Compatibility Problem was marked as the answer   
    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.
  4. Jan's post in Blank Field Equals To Zero Value was marked as the answer   
    Hello naidah14,
     
    Maybe, conditions in Calculated fields can help.
     
    Does it work for you?
  5. Jan's post in Limiting Search Results was marked as the answer   
    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?
  6. Jan's post in Trim White Extra Space From Both Ends. was marked as the answer   
    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.
  7. Jan's post in Delete Record Confirmation Hidden was marked as the answer   
    Hello,
     
    As a temporary solution, you can add a Header&Footer element, select the Header, click the Source button and enter the following code:
    <style type="text/css"> #Alert { top: -45px !important; } </style> The confirmation message is moved up and buttons are displayed.
    You can enter your value instead of "-45", if buttons are not displayed still.
    Also you can move the message to the left:
    <style type="text/css"> #Alert { top: -45px !important; left: -100px !important;  } </style> I am not sure that it is a good solution, but maybe it can help.
  8. Jan's post in If Statement In Detail Report was marked as the answer   
    Hi MostlyJava,
     
    As far as I know, the InsertRecord prefix is used on Submission Forms, on Details and Single Update Forms the EditRecord prefis is used.
    You can change the Id InsertRecordPalmas to EditRecordPalmas.
     
    You can find more details about names etc. in a guideline for referencing Caspio form elements using JavaScript.
     
    I hope, it helps!
  9. Jan's post in Js: Virtual Field Radio Buttons Values With Javascript was marked as the answer   
    Hello MostlyJava,
     
    If I understand correctly, you use two scripts that use "window.onload=function()", but the onload event happens once. In this case, only the last function executes.
     
    You can concatenate both scripts as follows:
    <script> window.onload=function(){ var new_value = "AAA"; /* change the value of the first option of the checkbox */ document.getElementById("cbParamVirtual10").value=new_value; /* change the label text of the first option of the checkbox */ document.getElementById("cbParamVirtual10").nextSibling.innerHTML = new_value; /* change the Virtual text field */ document.getElementById("cbParamVirtual2").value=new_value; } </script> I hope, it helps.
  10. Jan's post in Update Button For Detail Report was marked as the answer   
    Hello MostlyJava,
     
    As far as I know, you can use the same code for the Update button (you can change the name of the link, if you want).
    I have tested it on a Single Update Form, and the Form was submitted and the data was updated.
     
    Does you have any problem with this code?
  11. Jan's post in Is It Possible To Hide The Part Of A Text In An Html Block, If A Parameter Is Empty? was marked as the answer   
    Hello Cameron,
     
    If I understand correctly, you can use a JavaScript code.
    Please select your "HTML Block", click the "Source" button, delete the current text and enter the following code:
    Author: [@field:author] <script language="javascript"> var coauthor='[@field:coauthor]'; if (coauthor.length>0) { coauthor = ", Coauthor: "+coauthor; document.write(coauthor); } </script> Also I would recommend you to disable AJAX on the DataPage.
    You can open the "Results Page Options" step and uncheck the "Enable AJAX" checkbox.
     
    I hope, it helps.
  12. Jan's post in Is It Possible To Create Select All And Deselect All Buttons On A Search Page? was marked as the answer   
    Hi Cameron,
     
    You can add an HTML Block, click the "Source" button and enter the following code (the code can be used as it is, if the Listbox is the first field on the Search page. You can find the instructions how to define the id of a field in the article): <script type="text/javascript"> function selectAllOptions() { var ref = document.getElementById("Value1_1"); for(i=0; i<ref.options.length; i++) ref.options[i].selected = true; } function DeselectAllOptions() { var ref = document.getElementById("Value1_1"); for(i=0; i<ref.options.length; i++) ref.options[i].selected = false; } </script> <input type="button" value="Select All" onclick="selectAllOptions();" /> <input type="button" value="Deselect All" onclick="DeselectAllOptions();" /> I hope, it helps.
  13. Jan's post in How To Hyperlink View Details To Another Web Page was marked as the answer   
    Hi Tee,
     
    Welcome to Caspio Forum!
     
    Have you clicked the "Source" button in the HTML Block before you entered the code?
  14. Jan's post in Is It Possible To Filter Records By "previous Month"? was marked as the answer   
    Hello Cameron,
     
    If I understand correctly, you can use a JavaScript code.
     
    If you want to filter only by the "previous month" filter:
    1) On the "Search Type" step, select "Allow users to select data using a search form";
    2) On the "Select Search Fields" step, add your field with date;
    3) On the "Configure Search Fields" step,
    - select your field with date, select the "Month and Year" in the "Precision" dropdown;
    - add Header&Footer element, select "Footer", click the "Source" button and enter the following code:
    <SCRIPT LANGUAGE="JavaScript"> if(document.getElementById("caspioform")) {   document.getElementById("caspioform").style.display = 'none';    var nDate = new Date();    var baseMonth = nDate.getMonth();    var nPreviousMonth = baseMonth - 1;    var dPreviousMonth = new Date (nDate.setMonth(nPreviousMonth));    var searchMonth = dPreviousMonth.getMonth() + 1;    if (searchMonth<10) {searchMonth  = "0" + searchMonth; }    var searchYear = dPreviousMonth.getFullYear();    var searchString = searchMonth + "/" +  searchYear;    document.getElementById("Value1_1").value=searchString;   setTimeout('document.forms["caspioform"].submit()',1000); } </SCRIPT> The code enters previous month in the Search field and clicks "Search" button. User does not see the Search page, he or she sees Results page.
     
    If you want to filter by other fields,
    1) On the "Search Type" step, select "Allow users to select data using a search form";
    2) On the "Select Search Fields" step, add fields;
    3) On the "Configure Search Fields" step,
    - select your field with date, move it up to the first position, select "Hidden" in the "Form element" dropdown, select the "Month and Year" in the "Precision" dropdown;
    - add Header&Footer element, select "Footer", click the "Source" button and enter the following code:
    <SCRIPT LANGUAGE="JavaScript"> if(document.getElementById("caspioform")) {    var nDate = new Date();    var baseMonth = nDate.getMonth();    var nPreviousMonth = baseMonth - 1;    var dPreviousMonth = new Date (nDate.setMonth(nPreviousMonth));    var searchMonth = dPreviousMonth.getMonth() + 1;    if (searchMonth<10) {searchMonth  = "0" + searchMonth; }    var searchYear = dPreviousMonth.getFullYear();    var searchString = searchMonth + "/" +  searchYear;    document.getElementById("Value1_1").value=searchString; } </SCRIPT> The code enters previous month as one of search criteria.
     
    Does it work for you?
  15. Jan's post in Excel Formulas was marked as the answer   
    Hello dmanfra,
     
    Welcome to Caspio Forum!
     
    I am afraid, for now formulas are not imported, only values that are results of formulas.
    There is the idea in the ideabox. You can add your comment to the idea and ask to add the possibility to import formulas too.
  16. Jan's post in Responsive Label Text Position was marked as the answer   
    Hello DataCobalt,
     
    If I understand correctly, you can replace your line 
    #datapage-form labelcell {text-align: left !important;}
     
    With the following line:
    .cbFormLabelCell {text-align: left;} Does it work for you?
  17. Jan's post in Change Nav Arrow Color was marked as the answer   
    Hi DMart,
     
    If I understand correctly, you can scroll Element Types.
    Now you see three items, but there are two more below.
  18. Jan's post in Transfer Individual Cell Data From A Line In A Tabular Datpage was marked as the answer   
    Hello Alan,
     
    If I understand correctly, you can try doing the following steps:
    1) Create a Submission or Single Update Form (I am not sure, what you want - to add a new record or to edit the current record). This form receives parameters and auto submit the form.
    2) Create App Parameter with the URL of this form.
    3) Edit your Report DataPage, insert links that go to the Form and pass parameters:
    3a) Delete fields like "OK"-"NO" and add an HTML Blocks instead of them.
    3b) Edit HTML Blocks: click the "Source" button and enter the code like following:
    <a href="[@app:SubmissionForm]&resource=[@field:resource]&day=mon">[@field:mon]</a>
    <a href="[@app:SubmissionForm]&resource=[@field:resource]&day=tue">[@field:tue]</a>
    <a href="[@app:SubmissionForm]&resource=[@field:resource]&day=wen">[@field:wen]</a>
    <a href="[@app:SubmissionForm]&resource=[@field:resource]&day=thu">[@field:thu]</a>
    <a href="[@app:SubmissionForm]&resource=[@field:resource]&day=fri">[@field:fri]</a>
     
    I hope, it helps.
  19. Jan's post in How To Pull Record Count Info From Multiple Report Datapages Into One Report Datapage? was marked as the answer   
    Hi Berean,
     
    My idea is:
    1) Create the table with locations names.
    2) Create a Tabular Report, select the table from step 1 as a DataSource.
    3) On Results page add a Calculated field and enter SQL query like:
    SELECT SUM(name_of_the_field_with_id_in_view) FROM _v_viewname WHERE name_of_the_field_in_view_where_locations_are _stored = target.[@field:locationfieldname]
     
    Please, enter your values instead of green values.
     
    I hope, it helps.
    Let me know, if anything is not clear.
  20. Jan's post in Logout And Destination was marked as the answer   
    Hello Niranjan,
     
    Probably, you use incorrect URL.
    You can open the List of your Authentications, click the Properties link (in Menu under the name of the Authentication).
    The item "Logout link (use https for SSL):" will contain the correct URL.
     
    If you use URL Deployment, it is better to use "https" in the beginning of the URL.
     
    I hope, it helps.
  21. Jan's post in Rules For Fields Based On Prior Selection was marked as the answer   
    Hello Liz,
     
    You can try the following JavaScript code:
    <SCRIPT LANGUAGE="JavaScript"> function select_default()  {     var first_dropdown = document.getElementById("InsertRecordAdropdown");     var selection = first_dropdown.options[first_dropdown.selectedIndex].value;     var second_selection = "";     if (selection==1) second_selection = 3;     if (selection==2) second_selection = 5;     if (selection==3) second_selection = 7;     var second_dropdown = document.getElementById("InsertRecordBdropdown");     for (var i = 0; i < second_dropdown.options.length; i++ )         {         if (second_dropdown.options[i].value == second_selection)             {                 second_dropdown.options[i].selected = true;             }        }  } document.getElementById("InsertRecordname").onchange=select_default; </SCRIPT> Please, insert names of yours drop-down lists instead of Adropdown and Bdropdown.
    Usually, values of drop-down lists are numbers, so I have used numbers.
    You can use words, for example:
     
    if (selection=="30 - Athletics") second_selection = "3 - POS Detail";
     
    and so on.
     
    I hope, it helps.
    Please feel free to ask, if the code is not clear.
  22. Jan's post in Conditional Formatting Of Text In Datapage Tabular Report was marked as the answer   
    Hi Alan,
     
    You can add a Header&Footer element, select the Footer element, click the Source button and enter the following code:
    <SCRIPT LANGUAGE="JavaScript"> var elems = document.getElementsByTagName("td"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML=="OK")  { elems[i].style.color="green";} if (elems[i].innerHTML=="SH")  { elems[i].style.color="blue";} if (elems[i].innerHTML=="PH")  { elems[i].style.color="red";} } </SCRIPT> You can add as many conditions as you want, like
    if (elems[i].innerHTML=="HH")  { elems[i].style.color="yellow";} But if you use Ajax (or Bulk Delete), the Script code in Footer may does not work.
    In this case, you can add an HTML Block, select it, click the Source button and enter the following code:
    <div id="[@field:id]"></div> <SCRIPT LANGUAGE="JavaScript"> var line_id='[@field:id]'; var line=document.getElementById(line_id).parentNode.parentNode; var elems = line.getElementsByTagName("td"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML=="OK")  { elems[i].style.color="green";} if (elems[i].innerHTML=="SH")  { elems[i].style.color="blue";} if (elems[i].innerHTML=="PH")  { elems[i].style.color="red";} }</SCRIPT>  Please, change "id" in both [@field:id] to name of the unique field of your table.
      I hope, it helps.
  23. Jan's post in Google Map Markers was marked as the answer   
    Hi ryderlake,
     
    I see the code <script type="text/javascript">mapSettings.hideOnSearch='Y';</script> <div><input type="checkbox" checked="checked" onkeyup="mapEnvironment.ToggleMarkersVisible(this.checked, '379c300065720cd6b3754118815e');" onclick="mapEnvironment.ToggleMarkersVisible(this.checked, '379c300065720cd6b3754118815e');" />Show/Hide markers</div>   If I understand correctly, the code was added to Header, but the "Source" button was not clicked. And the same problem in every record:   <span id="MapItLink:2:379c300065720cd6b3754118815e"></span> <div id="Address:2:379c300065720cd6b3754118815e" style="display:none;">9 3225 MCCALLUM RD, ABBOTSFORD, BC</div> <div id="Description:2:379c300065720cd6b3754118815e" style="display:none;">TENANT ALTER - MEZZANINE</div> <div id="Latitude:2:379c300065720cd6b3754118815e" style="display:none;"></div> <div id="Longitude:2:379c300065720cd6b3754118815e" style="display:none;"></div> <script type="text/javascript">     try{ mapEnvironment.AddDpItemMapSettings('379c300065720cd6b3754118815e', '2'); }     catch(e){ } </script>   Please check, that code was added when the "Source" button was clicked.
  24. Jan's post in Caspio Bridge Permission For Access To Only Scheduled Task was marked as the answer   
    Hello Chad,
     
    As far as I know, now this Feature is not implemented.
    But if you add this idea to the ideabox, I believe many people will support it and the feature will be implemented!
  25. Jan's post in Enter Time? was marked as the answer   
    Hello aam82,
     
    There is the article how separate Input fields for Date/Time parts.
    I hope, it helps.
×
×
  • Create New...