Popular Content

Showing most liked content since 01/22/2017 in all areas

  1. 1 like
    Hi Twired, Thanks for the tips on this- I do understand re an image not being stored in the table but instead the path to that image is stored and then the image grabbed to open (that's how I used to set up my Access databases with image files). I believe what you're suggesting above is referencing the original image via a joined table in a View. Unfortunately, this isn't what I need to do. I need to actually duplicate the image into the new table. This is because the data in one table is used as a reference point to add records to another table but beyond that the are not relatable. As in table1 is a 'Catalogue' with records to draw from. Those records are used (sometimes) to populate records in table2 'Items' which are actual physical 'items and work' on a project. Once a record is in the Items table it is independent and can be changed in many ways. Likewise, the Catalogue record that was used to first 'create' the Items record can and will be changed. The image may be changed along with other information- but the 'Items' record that was made for it needs to NOT change also (because it is now an independent entity). Meaning if an image in the Catalogue record is changed then the image in the related Items record must NOT also change. So a View with joined tables would not work for this. This isn't a relational database 'don't duplicate data' issue- in this particular case I do actually need to duplicate some records, instead of using FKs. Hence, my query about how to duplicate the image into the new table. As per your explanation above, I was hoping to be able to duplicate the image path to the new table, into the image field. Because users enter data in this table in a few ways, manually as well as by copying from the 'Catalogue' table- so images need to be in a single field for displaying purposes. I can't have a field for manual upload when a record is manually created, and a separate (text) field for a 'copied' record from the Catalogue. The image field is used all over the app and if there are 2 fields (one an image field, one a text field from copying) it will not work in many (complicated) displays. So the fact that an image file must be user-uploaded (thanks for pointing that out) means that I can't copy the image path itself into an 'image' field, only to a text field. So that's a no-go, unfortunately. I had Caspio do some custom work on duplicating records in this way but was hoping to avoid that expensive and time-involved route, if possible. If I come across a solution I'll definitely post it here for others. Also, thanks again for your help on this- much appreciated either way.
  2. 1 like
  3. 1 like
    HI Diversity, As Mathilda mentioned, you have to hit "Source" button (in footer) and then paste the code in. Also, Hold down Control key when selecting from the listbox.
  4. 1 like
    You need to hit the source tab before inserting code to the footer. This article should help. Also don't forget to change the filed name in the code and you need to hold the Ctrl key on the keyboard while clicking on the required values simultaneously. Hope that helps
  5. 1 like
    Check your fields for null values...Caspio cannot add values if any of them are null. Try using the form: IsNull([@field:field1],0)+ IsNull([@field:field2],0) + .... + IsNull([@field:fieldx],0) This has worked for me. ET
  6. 1 like
    There is a feature called user logs, which allows to see this info. You may check here if your plan has this feature. Another option, you may create a separate table for history of logs and then create a submission form and receive user's ID and other datapa from authentication fields, then add auto-submit script. After that, you may specify in authentication to redirect user to that datapage and then after form is submitted, redirect user to the user's dashboard. It may sound a little bit complex, however it's easy to do. Please feel free to ask if something is not clear enough.
  7. 1 like
    Thanks for posting this- I need to play around with it to make it applicable to my particular scenario but this is a good place to start.
  8. 1 like
    Try changing the last line of code. Use: document.getElementById("EditRecordDispoToday").onchange = getT; instead of: document.getElementById("caspioform").onsubmit = getT; Another option is to create a rule. The rule will be: when DispoToday field equal to Yes - make TimeofView field display only Hope that helps Cheers!
  9. 1 like
    Hi Texter, Data in password fields are encrypted and can't be passed as a parameter. You may try using text field as a password and pass value to a field in form#2. You can show values in the field on the form #2 like ***, this setting can be found in the field options settings. (Show as password ***) Hope that help
  10. 1 like
    Hi TexterVaid, Thanks for the suggestion- I wasn't able to get it to work using that for some reason. I fiddled around and finally got the code to work- it seems Caspio is somewhat random as to what js works with its data fields. Removing the parseFloat, changing the if clause a bit (I tried 'else if' as suggested but just the 'else' ended up working) and making the fields 'hidden' seemed to get it right: var v_lk = document.getElementById("EditRecordmstrSuppliers_LinkedIn").value; if(!(v_lk) == "") { Thanks again for helping and hope this solution works for someone else too-
  11. 1 like
    Parent and Child are two different web pages. Parent - lead-info-center.html (excuse my lack of code box, I wanted to highlight things to help explain) ------------------------------------------------------- <body onload="setIframeSource()"> <div id="frmSummary1" class="licFr"> <div class="divHeader"> <h2>Summary</h2> <a onclick="window.ifrLeadSummary.location.href = 'lic-leadSummary.html'"></a><!-- refresh button --> </div> <div id="ifrDiv"> <iframe name="ifrLeadSummary" class="licIframe" id="ifrLeadSummary"></iframe> </div> </div> <script> //set iframe source function setIframeSource() { varLeadID = getQueryVariable("LeadID"); document.getElementById('ifrLeadSummary').src = 'lic-leadSummary.html?LeadID='+varLeadID; } </script> ------------------------------ child - lic-leadSummary.html ------------------------------- <body> <div id="ifr" class="ifrContent"> <script type="application/javascript" src="https://b5.caspio.com/scripts/e1.js"></script> <script type="application/javascript">try{f_cbload("***","http:");}catch(v_e){;}</script> </div> </body> ------------------------------- The child is basically an html file with only the Caspio Deploy code. If you want a param to come from another iframe, you'll need some way to set the variable. The example you provided loads an entire second page, but your question seems like you want it all on one page. The code above using a URL Query Variable (web-page.html?variable=value) from the page load, but you can get the value of an element and add it to the setIframeSource script. maybe something like... <script> //on click, set iframe source document.getElementById('buttonID').onclick = function () { var pSearch = document.getElementById('searchElementID').value; document.getElementById('ifrLeadSummary').src = 'child.html?filterField=' + pSearch; } </script> ********************* To Build and Test, use alert(someVar); or alert('step1'); throughout your code. It allows you to see what values your variables are set at,,,, and where your code is breaking (when I'm writing something new that is proving challenging, I'll put alert('step[X]'); after every line to dial it in)
  12. 1 like
    Hello, Another formatting trick! I previously had challenges getting Caspio Forms to scroll properly. Then I learned about viewport in CSS -> https://web-design-weekly.com/2014/11/18/viewport-units-vw-vh-vmin-vmax/ #caspioform { overflow: auto; height: calc(100vh - 96px); } I use calc() to take into account the header. If you use calc the spaces between the values and the operator(-,+,*,/) is required.
  13. 1 like
    Try this. After hours of googling came across it. Used on wordpress. <script> function submitallforms() { setTimeout('document.forms[0].submit()',100); setTimeout('document.forms[1].submit()',200); setTimeout('document.forms[2].submit()',300); } // End --> </script> <input type=button value="Submit" onclick="submitallforms();">
  14. 1 like
    The script below records date/time (timestamps) when a specific field (in my case Status field) is updated. You don't need any virtual field. Place the script in the Footer of your details/update page. Status is my dropdown field (it could be a text field as well). Time_status_edited is a hidden field to store the timestamp upon updating the Status field. <script type= "text/javascript"> function getT() { var prevValue='[@field:Status]'; if(document.getElementById("EditRecordStatus").value != prevValue) { document.getElementById("EditRecordTime_status_edited").value = '[@cb:Timestamp]'; } } document.getElementById("caspioform").onsubmit = getT; </script>
  15. 1 like
    Hi iren, You can create a Virtual field and select Hidden Form element. In Field Options of the Virtual field, select Data Source Fields and your field (for example, Status). This Virtual field will "remember" the initial value of the field. Then add a Header&Footer element, select Footer, click Source and enter the following code: <script type= "text/javascript"> function getT() { if(document.getElementById("EditRecordStatus").value != document.getElementById("cbParamVirtual1").value) { document.getElementById("EditRecordTime_edited").value = '[@cb:Timestamp]'; } } document.getElementById("caspioform").onsubmit = getT; </script> Enter names of your fields instead of Status and Time_edited and change the number of the Virtual field in cbParamVirtual1, if the added Virtual field is not the first. Also make the Time_edited field hidden in the details/update form because you don't want user to be able to update it. I hope, it helps.
  16. 1 like
    In fact with a little more detective work and light bulb going on inside my head I have managed to resolve the issue myself. For those who maybe interested the answer is below:- The answer really was not so much in VBA, but how to manage variables in SQL statements, once I understood this a quick internet search provided the answer. obj.wsm_UpdateData TextBoxAccountId.Value, TextBoxProfile.Value, TextBoxPassword.Value, _ TextBoxTableName.Value, False, "Trl_No", TrailerNoField, "route = '" & RouteField & "'" Seem to have save myself $150 minimum in Caspio developer support charges. So worth the extra effort. Regards Simon
  17. 1 like
    The question was answered via email but I post it here for everyone's future reference: Dear Graeme, Thank you for contacting Caspio Support. You are asking very good questions. 1. Updating field names in table is automatically reflected in DataPages as well, however there a few things to note when you change a field name in the table. • Field name in the table is different than the field label that you see in the DataPage (form and reports). Therefore if you change a field name in the table, the field label in DataPages remain unchanged. If you want to update the labels, you need to edit each DataPage and change the label in the Configure Fields wizard screen. • If you have used field parameters in the DataPage inside HTML blocks or Header/Footer or in JavaScript coding (if you have any) such as [@field: Course_name] then you will need to update those manually in each DataPage. 2. DataPage names could be updated as you wish. If you have references to the updated DataPage in other DataPages, the references will be updated automatically. 3. When you change data types you need to note a few things: • Changing data types may remove data if the data does not match the new data type. For example, if you change text255 to date/time, you need to make sure the data is in date format (mm/dd/yyyy). When you change the data type, system generates warning before performing the action, we recommend you read the warning details and take necessary action before confirming the update. • Changing data types also may remove the field from the DataPages; you will need to edit the DataPage and add the field back. If you change text255 to text64000, the field stays intact however from one type such as Text to another such as Number, will remove the field from DataPage. Regards, Caspio Support
  18. 1 like
    Because you need provide your credentials each time when you create API call, you need create some proxy page on the server and call API from server-side. In JS you can communicate with proxy just create some proper request without any security information.