Jump to content

Search the Community

Showing results for tags 'virtual fields'.

  • 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 11 results

  1. I'm trying to do a validation of a combination of fields (if a virtualParam 4 says that a deposit is required, you can't choose cash payment). The choice of cash payment is an InsertRecord field that lives in a drop-down box. Note - cbParamVirtual4 is a Select from a table that is bringing back a Yes/No field - I've already had some fun trying to figure out whether to treat that as 1/0 or Yes/no... The answer was Y/N (not yes/no, just y/n). I've seen several example scripts - both in the footer and in HTML blocks designed to validate fields on a page, but I can't seem to get any of them to validate my page. I've tried this one and this one. I also looked at this one but don't understand it. Nothing I do seems to make the validation fail. I've tried If (1=1) and even tried removing the If statement altogether, but the submission always goes through. My most current code looks like this - would greatly appreciate any suggestions. <SCRIPT LANGUAGE="JavaScript"> function pmt() { var depreq = document.getElementById("cbParamVirtual4").value; var pmtplan = document.getElementById("InsertRecordPaymentMethod").value; if (depreq!='Credit Card'){ alert("Please select Credit Card payment for this service"); return false; } } document.getElementById("caspioform").onsubmit=pmt; </SCRIPT>
  2. Hello, I have created a search data page similar to the example shown in http://howto.caspio.com/tech-tips-and-articles/parameters/add-a-search-interface-to-results-sets-page/ The search works fine the first time around (sometimes on a clean page load), but if you search again the search and appsession parameter from the previous search are still shown cached in the browser. Manually deleting these from the browser URL Bar allows for a successful search. From within the search form, I tried setting the destination to the same page and used the same search page url (http://www.mydomain.com/searchpage.html?cbResetParam=1). But apparently this clears the search parameter before the results data page can receive them. My question is where do I insert the cbResetParam=1 reset parameter to reset the browser cache when a new search is submitted from the submission form? I am guessing it could be reset "onclick" using js in the footer, but alas I am still learning js and could not find any examples to get started on Thank you in advance for any help on this.
  3. I want to change a header of submission datapage based on a comparison between two virtual fields on the page. The virtual fields are fixed values for the record drawn from an underlying query, using dropdown values. If Virtual 2 <> Virtual 3 a section with a submission field for the Financial Statement Report is hidden (via Rule 1) , and if Virtual 2 = Virtual 3 the same field is set to be required (via Rule 2). I did not create the header, but it looks currently like this: <div class="container mt-3 mb-3"> <div class="row"> <div class="col mb-3" style="display:inherit !important;"> <h4>Add your Invoice and a Financial Statement Report</h4> <a href="https://c4ffn695.caspio.com/folderlogout" class="ml-auto btn btn-secondary">Logout</a> </div> </div> <div class="row"> <div class="col"> If Virtual 2 <> Virtual 3, I want to header to read 'Add your Invoice' and if not 'Add your Invoice and the Financial Statement Report' I tried (to no avail) - with different header values - the following script in the Footer <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { if ("[@cbParamVirtual2]" == "[@cbParamVirtual3]" ) { document.querySelector("h4").innerHTML="Some title"; } else { DataPage, you may try document.querySelector("h4").innerHTML="Other title"; } }); </script> But I am no JS expert Any help sincerely appreciated Floris
  4. Hi, I am attempting to use Virtual Fields to allow a user to specify some input that must appear on each line of a tabular report. The report requires the person who exports it to provide some contact information, and I do not want to hard-code this information. I have set up a Virtual Field as a search field, and set it to "pass as parameter" called [@Virtual1]. In my report body, I would like to display the value of the Virtual Field variable. I have attempted to use a calculated field and just put [@Virtual1] as the value, but I get an "Error in forumla." when I attempt to run the report. Per this post, I also tried [@cbParameterVirtual1] in a calculated field, but that results in the same error. I have tried a few Javascript solutions, but can't seem to find the right reference to the Virtual Field variable. I can't seem to find a clear answer on how to reference virtual fields within the datapage they are created (or if it's even possible). I've posted some screenshots of my setup below, any help is greatly appreciated!
  5. Is it possible to use virtual fields as search criteria? I have a report datapage with an actual search field named "Client_ID". That field is "Hidden". I also have two virtual fields, each with a different multi-select listbox. The virtual fields are both labeled "Client ID" and the one that gets displayed for the user to select from depends on the contents of an auth field (using a rule). I want the selections from the virtual field that is displayed to be used as the actual "Client_ID" selections in the search. The code I currently have in the footer (that doesn't work) is: <script> function setSearch(){ if("[@authfield:Level#]" == 3){ document.getElementById("@field:Client_ID").value=document.getElementById("cbParamVirtual1").value; } else { document.getElementById("@field:Client_ID").value=document.getElementById("cbParamVirtual2").value; } } document.getElementById("caspioform").onsubmit = setSearch; </script> Is what I'm looking to do even possible? I know I can have a separate search form and report datapage but I would prefer not to do that if possible.
  6. Hi! This is my first question on this forum, so I apologize if this question is not in the scope of the board I followed this thread to concatenate values from four virtual fields onto an existing field on a details page upon "update". I added the code below to the footer of my details page, and it worked when my virtual fields were text fields. However, this code did no longer worked when I changed my virtual fields to autocomplete fields. Is there another step I need to convert the autocomplete to text? <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x0 = document.getElementById("EditRecordOtherCollectors").value; var x1 = document.getElementById("cbParamVirtual2").value; var x2 = document.getElementById("cbParamVirtual3").value; var x3 = document.getElementById("cbParamVirtual4").value; var x4 = document.getElementById("cbParamVirtual5").value; document.getElementById("EditRecordOtherCollectors").value = x0+" "+x1+" "+x2+" "+x3+" "+x4; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Thanks!
  7. Hi I am new to using Caspio and would appreciate some help building a form and report which searches across 4 language database entries (L1-L4). I need 9 language search boxes in 3 columns (this will be expanded later to allow more parameters). The logical connection between each of the four boxes in each column vertically is AND and the relation between the 3 columns horizontally is OR. For example, to find people in the database who speak English and German and/or Spanish (and any combination of these), would look like on the search form: English English English AND AND AND Spanish OR Spanish OR German AND AND AND German [no selection] [no selection] I have built the form datapage using virtual fields to try to pass on to the report but I am struggling at this point. I can see that it is easy to have one search box searching records in L1-L4 using virtual fields, but not multiple search boxes searching multiple records in L1-L4. I have already looked at the various tutorials and guides on the caspio site but I cannot work this out. My general query is: is this possible? My more specific question is: is it possible to pass parameters from more than one virtual field to the report? More particularly, if, as in the case above, I have made no selection, can Caspio be told to ignore those fields for the purposes of the search? Many thanks for your help Toby
  8. <script type="text/javascript"> function calculate(){ var pm1 = document.getElementById("cbParamVirtual3").value; var pm2 = document.getElementById("cbParamVirtual8").value; var pm3 = document.getElementById("cbParamVirtual13").value; var pm4 = document.getElementById("cbParamVirtual18").value; var pm5 = document.getElementById("cbParamVirtual23").value; var pm6 = document.getElementById("cbParamVirtual28").value; document.getElementById("EditRecordTotal").value = pm1 + pm2 + pm3 + pm4 + pm5 + pm6; } document.getElementById("Mod0EditRecord").onmouseover=calculate(); </script> There's my code, I don't know why it's not executing. I tried using the Inspect option in my browser and found this... being called on this line var pm1 = document.getElementById("cbParamVirtual3").value; The field is not null, so I inspected the field I inspected that field and the inspector tells me the Id of that field is actually as follows: So it seems a random set of characters is being added at the end of all my fields, making me unable to "getElementById" since I'll never know what the random set is going to be... How can I either find out that random set or stop it from being generated? Thanks!
  9. Hello, Thanks in advance for checking this out. I use separate Search and Results datapages to filter a results table on a single web page. I am looking for a way to hide the Search fields if a user navigates to the "Details" view. Is there a way to do this with JS? I figure I could also remove the details page, create a new details only datapage, and just use an html block link with querystring parameters from the results table to connect the two but am more interested in if there is a coded way to accomplish this. Thanks again. codell
  10. Hi All… Joined today and my first question to the Forum (I'm a novice so please forgive me if I ask dumb things about coding)! My web form contains some search fields and a pivot table, all on one page. For searching I use a submission form with virtual fields to pass parameters to the Pivot table report. Two of my virtual search fields are “Region†(listbox), and “Country†(cascading listbox with “Region†as the Parent), but I need to have ‘multi-select’ for BOTH listboxes. Thanks to this Forum I’ve managed to get multi-select ‘sort of’ working, using JavaScript in the footer: <SCRIPT LANGUAGE="JavaScript"> /* "Note that ‘cbParamVirtual1’ = the ‘Region’ listbox (ie Parent) */ /* " ‘cbParamVirtual2 = the ‘Country’ cascading listbox. */ var fieldName1 = "cbParamVirtual1"; var fieldName2 = "cbParamVirtual2"; var x1=document.getElementsByName(fieldName1); var x2=document.getElementsByName(fieldName2); x1[0].multiple=true; x2[0].multiple=true; </script> The problem: If I select just one region in Parent listbox, I happily get all the countries associated with that region in the cascading listbox. And I can go on to multi-select those countries. Perfect! BUT, if I multi-select, say “N.America†AND “Europeâ€, then my ‘Country’ cascading listbox just states “No options availableâ€. What I want is for it to list all the countries in both , “N.America†+ “Europeâ€. Somehow my multi-selections from the Parent just aren't being recognised. (Needless to say, this all works seamlessly in a tabular report format). I’d very much appreciate any help.
  11. Our database is designed to retrieve journal/magazine/etc. articles related to the user search term. We have used the guides for 'How to do a keyword search across multiple fields' and 'Separate Search Page and Results page' to create our search and results forms. Our search form currently allows users to search across the database using one entry/search field 'Search Phrase'. We want to add additional boxes to our search form to refine the search - search for specific author, title, etc. We can add these additional search fields but when we do, the results page returns ALL database records rather than the 2, 3, etc. that it should. We are thinking this is something with either logic or the way the parameters are passed over. Ideally we want the search form to 'Search across database' and/or 'Search for specific author/title/etc.'. Right now we seem to be able to get one or the other, but not both. Any help would be greatly appreciated!
×
×
  • Create New...