Jump to content

douvega

Caspio Guru
  • Content Count

    127
  • Joined

  • Last visited

  • Days Won

    7

Reputation Activity

  1. Like
    douvega got a reaction from BFuchs in 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.
  2. Confused
    douvega got a reaction from gsgriffin in Can JS extract data from data table?   
    Sure, I can help you with that. Instead of using a service as proposed, I can build a custom PHP call for you to get the data.
    Feel free to visit our website at  https://www.futuresuite.net for further discuss your needs and provide you with the most appropriate solution.
  3. Like
    douvega got a reaction from Glitch in Sms   
    You can also use INTEGROMAT. I have found this service very useful to connect to many third party apps and it is very affordable.
    I have already integrated it with ClickSend as SMS provider and it works really well.
    I hope you can build what you need with all the suggestions provided for this post.
    Regards.
  4. Thanks
    douvega got a reaction from DaveC in Bulk Update Yes/No Field   
    Hi,
    You can create a Report > Tabular datapage: https://howto.caspio.com/datapages/reports/creating-a-report-datapage/
    Then enable the bulk edit option: https://howto.caspio.com/datapages/reports/data-editing-options-in-reports/
    I hope it helps.
  5. Thanks
    douvega reacted to MayMusic in Collapsible group, only one open by default   
    Each category value needs to be a plain text for instance:
    var category1 = document.querySelectorAll("[class^=cbResultSetGroup1Label]")[0].innerText.replace(/\s/g, ""); var category2 = document.querySelectorAll("[class^=cbResultSetGroup1Label]")[1].innerText.replace(/\s/g, ""); var category3 = document.querySelectorAll("[class^=cbResultSetGroup1Label]")[2].innerText.replace(/\s/g, ""); Then let's say if you want the top1 group value to be expanded by default:
    if(category1 == "Top1"){ document.getElementsByTagName("span")[1].setAttribute("data-cb-collapsed", "true"); document.querySelectorAll("[id^='DataRow'][class^='cbResultSetDataRow']")[0].setAttribute("style", "display: true"); } else if(category2 == "Top1"){ document.getElementsByTagName("span")[2].setAttribute("data-cb-collapsed", "true"); document.querySelectorAll("[id^='DataRow'][class^='cbResultSetDataRow']")[1].setAttribute("style", "display: true"); } else if(category3 == "Top1"){ document.getElementsByTagName("span")[3].setAttribute("data-cb-collapsed", "true"); document.querySelectorAll("[id^='DataRow'][class^='cbResultSetDataRow']")[2].setAttribute("style", "display: true"); }  
  6. Like
    douvega got a reaction from Mathilda in Overwrite Localization Date Format on datapage   
    Why dont changing the format in a way both regions can understand? Instead of 01/08/2017 make it 08/Jan/2017?
    Hope it helps.
  7. Thanks
    douvega got a reaction from SDmesaweb in Clearing Values in A Search Form   
    Try this:
    <p><a onclick="clearForm()" style="cursor:pointer;">Clear Form</a></p> <script> function clearForm () { location.reload("[@cbHostPage]?cbResetParam=1"); } </script> Please note that when you search again for something, you need to get rid of "cbResetParam=1" in your URL. This is done when you redirect the page from your search form. As long as you do that, you may be fine.
    Let us know whether or not it works.
  8. Thanks
    douvega got a reaction from Accountability in Validate Date and Time   
    Hi there,
    I just tested this code and it works on form submit. Just remember that this Caspio Form should be the only one deployed in your webpage. 
    <script> document.getElementById("caspioform").onsubmit = function(){ var dateOutString = document.getElementById('InsertRecordDefined_Time_Out'); var dateInString = document.getElementById('InsertRecordDefined_Time_In'); var dateOut = new Date(dateOutString.value).getTime(); var dateIn = new Date(dateInString.value).getTime(); if (dateOut <= dateIn){ alert("Please enter a date and time OUT after date and time IN "); dateOutString.value = ''; document.getElementById("cbParamVirtual6").value = ""; document.getElementById("cbParamVirtual7").selectedIndex = ""; document.getElementById("cbParamVirtual8").selectedIndex = ""; document.getElementById("cbParamVirtual10").selectedIndex = ""; return false; } }; </script>  
  9. Like
    douvega got a reaction from roattw in Can you hide an HTML block with a rule?   
    Dear roattw,
    Please replace your current HTML block for the following code:
    <div id="msg24"></div> <script> var radioField = document.getElementsByName('InsertRecordLSN_time'); var messageCnt = document.getElementById('msg24'); function getRadioValue(){ for (var i = 0, length = radioField.length; i < length; i++) { if (radioField[i].checked) { return radioField[i].value; break; } } } for (var i = 0, length = radioField.length; i < length; i++) { radioField[i].onchange = function(){ if(getRadioValue() == 'Specific'){ messageCnt.innerHTML = '<span class="cbInfoText">*24-hour clock</span>'; } else { messageCnt.innerHTML = ''; } } } </script> Let us know whether or not it works.
  10. Thanks
    douvega got a reaction from Accountability in Time Sheet Date and Time in and Out   
    I think you have some typos in your script. InsertRecordcbParmVirtual1 is incorrect, cbParamVirtual1  is the correct ID, virutal fields are not defined by Insert or Edit prefixes.   Also, in dropdown fields, you can not have a keyup action since there is no such action, it should be onchange. Besides, to get dropdown values, you have a collection of objects, so you can not reference to them as you would do with normal text fields.   To get dropdown values you should use:   var e = document.getElementById("exactFieldID"); var ddValue = e.options[e.selectedIndex].value;   To track the onchange event:   document.getElementById("exactFieldID").onchange = yourFunctionName;   Hope it helps.
  11. Thanks
    douvega got a reaction from Accountability in Problem with Concatenate in Real Time using onchange   
    For adding a date, I would suggest you using a system parameter. So, change the link var line for this:
    var link  =  five + ", " + four +" - " +one + " - " + two + " - " + three +" - [@cbTimestamp*]";
    Then, remove the var six line inside the function and also remove the corresponding triggering field.
  12. Thanks
    douvega got a reaction from Accountability in Problem with Concatenate in Real Time using onchange   
    There are some typos.
    document.getElementById is singular as it can be only one Element with the same ID, whereas document.getElementsByName is plural, that is why you need to specify which object you are referring to with [x] number.
    Please try this and advise whether or not it works.
    <script> function concatenate() { var four = document.getElementById("InsertRecordEmployee_First_Name").value; var five = document.getElementById("InsertRecordEmployee_Last_Name").value; var one = document.getElementsByName("InsertRecordEmployee_HR_Section")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].value; var three = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var link = one + " " + two + " " + three + " " + four + " " + five; document.getElementById("InsertRecordEmployee_Document_Link").value = link; } document.getElementById("InsertRecordEmployee_First_Name").onkeyup = concatenate; document.getElementById("InsertRecordEmployee_Last_Name").onkeyup = concatenate; document.getElementsByName("InsertRecordEmployee_HR_Section")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Title")[0].onchange = concatenate; </script>  
  13. Thanks
    douvega got a reaction from Accountability in Problem with Concatenate in Real Time using onchange   
    After checking your site, please try the following:
     
    <script language="JavaScript"> function concatenate() { var one = document.getElementsByName("InsertRecordEmployee_HR_Section")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].value; var three = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var link = one + " " + two + " " + three; document.getElementById("InsertRecordEmployee_Document_Link").value = link; } document.getElementsByName("InsertRecordEmployee_HR_Section")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Title")[0].onchange = concatenate; </script>  
×
×
  • Create New...