Jump to content

Search the Community

Showing results for tags 'virtual'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 9 results

  1. Hi, I have some code I'm trying to get to work in the Footer on a Details form to halt AutoSubmit code when a value of 1 is reached in a Virtual field (calculated). The Details datapage is set to go to 'Next Record' on update so the Auto Submit cycles through the records. The problem is that when it gets to the last record it keeps auto submitting and I need it to stop AFTER submitting the last record. I found some code on this forum but can't get it to work- that code was older, before virtual fields could be calculated. If anyone knows how to adjust this code to get it to work that'd be really great. <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementsByName("cbParamVirtual2")[0].value==1) { document.getElementById("caspioform").style.visibility = 'hidden'; document.write('<font face="arial" color=red size="5">No more Submissions!'); } else { setTimeout('document.forms["caspioform"].submit()',1000); } } </script>
  2. I accidentally posted this in the wrong forum (datapages) so I wanted to repost it here: I have some code I'm trying to get to work in the Footer on a Details form to halt AutoSubmit code when a value of 1 is reached in a Virtual field (calculated). The Details datapage is set to go to 'Next Record' on update so the Auto Submit cycles through the records. The problem is that when it gets to the last record it keeps auto submitting and I need it to stop AFTER submitting the last record. I found some code on this forum but can't get it to work- that code was older, before virtual fields could be calculated. If anyone knows how to adjust this code to get it to work that'd be really great. <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementsByName("cbParamVirtual2")[0].value==1) { document.getElementById("caspioform").style.visibility = 'hidden'; document.write('<font face="arial" color=red size="5">No more Submissions!'); } else { setTimeout('document.forms["caspioform"].submit()',1000); } } </script>
  3. Hello, I have some code running in the footer of an Update datapage that on change of one virtual field (Virtual 4: drop down) gets the value of another virtual field (Virtual 7: cascading text, with Virtual 4 as the ParentID) and copies that value of Virtual 7 into a text64000 field. The problem is it keeps getting the 'previous' value of Virtual 7 and not the current one, when Virtual 4 is updated. Meaning the code runs the 'copy' function BEFORE Virtual 7 is updated. I need to get the 'updated' data from Virtual 7 and copy that into the text64000 field. The code I'm using is: $("[name='cbParamVirtual4']").change(function(){ f_copy_print_address('cbParamVirtual7', 'cke_EditRecordShipToAddress'); }); So if there's some way to 'refresh' or 'update' Virtual 7 before the f_copy_print_address code runs that'd be great. Many thanks!
  4. Hi, I've reviewed the forums and have been able to successfully pass virtual field data into my Caspio tables using the '"Cascading drop-downs" JavaScript code method in the header and footer section of the form. It's working perfectly. I'm currently having an issue passing virtual field data into my Caspio table using a "Single Record" update form; which is required for my multi-step submission form . I modified the code for 'text field' (removing the [0]) since cascading drop-downs are not being used. The user will be entering data into the form directly. The code I'm using to 'get' the virtual text field value in the Header section of the single record update form is: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x = document.getElementsByName("cbParamVirtual1").value; document.getElementById("LandFillRate1_Field").value = x; var x = document.getElementsByName("cbParamVirtual2").value; document.getElementById("LandFillRate2_Field").value = x; var x = document.getElementsByName("cbParamVirtual3").value; document.getElementById("LandFillRate3_Field").value = x; var x = document.getElementsByName("cbParamVirtual4").value; document.getElementById("LandFillRate4_Field").value = x; var x = document.getElementsByName("cbParamVirtual5").value; document.getElementById("LandFillRate5_Field").value = x; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> The code I'm using to insertrecord into the table in the Footer Section of the single record update form is as follows: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x = document.getElementById("cbParamVirtual1").value; document.getElementById("InsertRecordLandFillRate1").value = x; var x = document.getElementById("cbParamVirtual2").value; document.getElementById("InsertRecordLandFillRate2").value = x; var x = document.getElementById("cbParamVirtual3").value; document.getElementById("InsertRecordLandFillRate3").value = x; var x = document.getElementById("cbParamVirtual4").value; document.getElementById("InsertRecordLandFillRate4").value = x; var x = document.getElementById("cbParamVirtual5").value; document.getElementById("InsertRecordLandFillRate5").value = x; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Unsure if my getElement should be by Name or ID; and if it differs between the header and footer scripts. The examples for the footer script show ID and the header shows name. I'm officially confused. I'd greatly appreciate any assistance provided. I checked the script using the F12 function in the console and everything looks good but still no data showing in the table. Thanks, Bre
  5. Hello, I have a registration form for Chapters of our organization that can represent more than one state, or even country. I use a script that dynamically shows listboxes for state or province depending on whether the US or Canada is selected. They both post to the same field, and so Virtual Fields are utilized. This all works fine, but I need those Virtual Fields to be Multi-Select. I do utilize the suggested script already, and I can get the Multi-Select to work on the form. The problem is that even though my two Virtual Fields are Multi-Select, only one selection makes it to the table. What is wrong with my script? Country WORKS, it is not a Virtual Field, as does Languages_Spoken. Virtual 2 and Virtual 3 WILL Multi-Select, but ONE selection makes it into the table. I hope this explains clearly. Form is at https://c3gaf515.caspio.com/dp.asp?AppKey=54ce4000db281c70d086433eb0fc Thanks <SCRIPT LANGUAGE="JavaScript"> /* "fieldName" is the variable name for the listbox type form element field. */ var fieldName = "InsertRecordLanguages_Spoken"; var x=document.getElementsByName(fieldName); x[0].multiple=true; /* "fieldName2" is the variable name for the listbox type form element field. */ var fieldName2 = "InsertRecordCountry"; var x=document.getElementsByName(fieldName2); x[0].multiple=true; /* "fieldName3" is the variable name for the listbox type form element field. */ var fieldName3 = "cbParamVirtual2"; var x=document.getElementsByName(fieldName3); x[0].multiple=true; /* "fieldName4" is the variable name for the listbox type form element field. */ var fieldName4 = "cbParamVirtual3"; var x=document.getElementsByName(fieldName4); x[0].multiple=true; </SCRIPT>
  6. Hi, I'm trying to run a 'change' function on a virtual field ONLY when a regular field is Null. This is in a submission form. The code I have below seems to run automatically when the form is opened, I guess because the virtual field is a cascading dropdown so it's 'changing' when the form is loaded, based on the parent field. I only want this code to run if the 'ItemID' field (ItemID is not the parent of the cascading Virtual9) is null. If it is not null then I need this code to not run at all, even onload. I've tried a bunch of different 'if' scenarios but can't get it to work. Hopefully someone can help.. <script> $("[name='cbParamVirtual9']").change(function(){ var itid = document.getElementsByName("cbParamVirtual9")[0].value; var item = document.getElementsByName("InsertRecordItemID")[0].value if (item !== null) { document.getElementsByName("InsertRecordItemID")[0].value = itid; } } ); </script> NOTE: I ran an alert window to make sure the values in Virtual 9 are being gotten and used- they are and they are put in the ItemID field as needed on the Virtual 9 change. The problem is that when ItemID is not null on the form's load (it receives and external parameter, if there is one) the code still runs. This will overwrite the ItemID's external parameter received. Also, I'm not sure why ItemID works with getElementsbyName instead of getElementbyID because it's just a text field and not dropdown,list,cascading, etc. But the code didn't work unless I used getElementsbyName.. I think I just need to add the correct 'if' expression that runs or doesn't run the 'Change' function next. <script> var item = document.getElementsByName("InsertRecordItemID")[0].value; <!-- right here I need an if (item !== null) to then run the change(function(){ but that if it's not null to not run the change(function(){ --> $("[name='cbParamVirtual9']").change(function(){ var itid = document.getElementsByName("cbParamVirtual9")[0].value; document.getElementsByName("InsertRecordItemID")[0].value = itid; } ); </script>
  7. I have a submission form where there's a choice aside from the normal 'submit new record' function (that's available too but the user can also go this other route). There is a Virtual Field that is a List Box. The user can select a single record from this List Box (not multiple records) and then click a button (not the Submit button) to go to a different datapage. I need to pass the Value of the Virtual List Box as a parameter in the button's url link but don't know how to 'save' that value on the Virtual Fields' 'change'. Does anyone know how to use the Virtual field's current value (probably using a variable from 'on change'?) as a parameter in a url? In this example Virtual 1 is a List Box that stores a numerical unique ID value for the selection. I need to pass that in the url as a parameter. <div style="text-align: center;"><a href="../mypage?ExampleID=[@cbParamVirtual1]&otherfieldID=[@otherfieldID]" target="_self"><input class="cb_custom_btn" type="button" value="LINK" /></a></div>
  8. Does anyone know the adjustment for this code to work? I'm trying to copy the value of a Virtual field (drop down) to a regular text field, on a button's click. Here's the code I'm working with: <div style="text-align: center;"> <input class= "cb_custom_btn" type="submit" onclick="myfunction()" value="Submit" /> <script> function myfunction() { var virtualval = document.getElementByID("cbParamVirtual4").value; document.getElementByID("InsertRecordMyFieldName").value = virtualval; } </script> </div> I'd also tried the ElementsByName with [0] for cascading values but that doesn't work either.. What's weird is I've used code similar to this for the same purpose with no problem so I must be missing some minute detail. Any help would be greatly appreciated.
  9. I am having an issue to pass the value of a Virtual field to the email. To simplify, the issue can be reproduced as following: 1) create a table that contains a field of email address. Add an entry to the table with your email. 2) create a report for the table. add a virtual field Virtual1. add Virtual1 to the detail page. enable bulk edit 3) configure Acknowledgement email to send to the email address in the table record. add in email body to show Virtual1. It will be [@cbParamVirtual1] 4) Preview, when asked, put something in Virtual1 to simulate. In result page, select all, then edit, change something then Update. When you click Update, an email will be sent to all email address in the table. In detailed page, i can see Virtual1 shows the value I entered. But in the email I received, it shows empty where [@cbParamVirtual1] is. Is the virtual field supposed to be able to be passed to email?
×
×
  • Create New...