Jump to content

Breee

Caspio Ninja
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Breee

  1. Hi After researching I'd like to simplify the question. I'm using the following code (styling removed): <script> function getElementByClass(classer) { var allHTMLTags=document.getElementsByTagName("*"); var array = []; for (i=0; i<allHTMLTags.length; i++) { if (allHTMLTags.className==classer) { array.push(allHTMLTags); }} return array;} function channel(n){ var frames = getElementByClass("ChannelView"); var length = frames.length; for(var i = 0; i < length; i++) { if(frames.id == ("viewer"+ n)) { frames.style.display = "inline"; }else{ frames.style.display = "none";}}} </script> <div style="display:block; text-align:left;"> <div style="display:block;"> <ul id="menu"> <li><a onclick="channel(0)">How To</a></li> <li><a onclick="channel(1)">e-Order New </a></li> <li><a onclick="channel(2)">e-Order Add Vendor</a></li> <li><a onclick="channel(3)">Status</a></li> </ul> </div> <div class="content"> <iframe frameborder=0 id="viewer0" class="ChannelView" src="http://www.test.com/Test1-0.html" style="display:inline"></iframe> <iframe frameborder=0 id="viewer1" class="ChannelView" src="http://www.test.com/Test1-1.html"></iframe> <iframe frameborder=0 id="viewer2" class="ChannelView" src="http://www.test.com/Test1-1.html"></iframe> <iframe frameborder=0 id="viewer3" class="ChannelView" src="http://www.test.com/Test1-3.html"></iframe> </div> </div> I need for frame Test 1-3 the status tab link to reload the status page onclick. The page is currently stale and does not show updates onclick unless a manual refresh is performed. The reload code that I've used will refresh the Status link to the parent page inside of the frame. I need the status link to refresh and show itself not the parent page. Here's the code that I've tried so far that refresh to the parent page: <input type="button" value="Refresh Page" onClick="window.location.reload()"> and <input type="button" value="Refresh Page" onClick="history.go(0)"> and <input type="button" value="Refresh Page" onClick="window.location.href=window.location.href"> Based on my research it appears that I need code that will refresh as soon as the tab is opened after switching the UI ID first. I located a snipped on jquery.com but am not sure how to use it with the existing Caspio code. Specifically the Caspio code uses "menu" instead of tabs and "Viewer" instead of panel ID. $('.tabs').each( function() { show: function(event, ui) { switch (ui.panel.id) { case 'tab1': $('#myiframe').get(0).contentWindow.location.reload(); break; default: } }); }); Again any help or guidance is greatly appreciated.
  2. Hi, I used the IFrame Embedded Tabbed Deployment instructions located on the Caspio Advanced customizations page. The iframe is working as designed but I'm having an issue with a report datapage included in the frame not refreshing. I have 4 Caspio datapages included in the frame. The first page 1-0 is a submission form that directs the user after submit to the second page 1-1 a tabular report. The second page 1-1 tabular report includes an Href link to a 3rd page 1-2 another submission form. The 3rd page 1-2 submission form directs the user back to 1-1 the tabular report w/href link in case the user needs to make additional requests. The 4th page 1-3 is a tubular report that displays all information submitted using the href link on the 3rd page 1-1 tabular report via the submission form on 1-2. My issue is the following: When I direct the 3rd page 1-2 after submit back to 1-1 with HREF link so that additional user requests can be made the Iframe does not update the report page 1-3. I have to manually refresh 1-3 to see the submission made on page 1-2. If I change the redirect of the 3rd page 1-2 after submit to the tabular report page 1-3 directly the report refreshes correctly in real-time without having to manually refresh. I'm trying to determine if a page has to actively be 'touched' in the iframe for updated table information to display without a manual refresh of the page. From a user perspective I'd like to make all my requests first (page 1-1/submission from 1-2) and then view the report (1-3) to confirm and check status. I don't think the user experience should be to view the report after every selection if other requests need to be made. As always I appreciate any feedback that can be provided. Thank you. Bre
  3. Good Morning, I'm need the sum of a 'paymentdue' field based on the date range (criteria) selected by the end-user. I'm currently using a sql select statement which is providing the grand total on the details page (formatted for use as the invoice). The sql statment is providing the grandtotal without any date criteria. I need the grand total to change (increase amount or lessen amount) based on the end-user's date range selections. Current Formula used in calculated field on details page: select sum(PaymentDue) from Test_Table where Name=target.[@field:Name] group by Name Tested the following statement which is not grabbing the date information selected from the caspio form thus returns the grand total w/o date criteria again: SELECT sum(PaymentDue) FROM Test_Table WHERE Start_Time >= [@field:Start_Time] AND End_Time <= [@field:End_Time] Is there anyway to have a details page pull the 'paymentdue' from the table based on the date range searched on the Caspio search form (I configured the details page to allow users to select data using the search form? I essentially need an aggregation function on the details page itself. I understand that this information cannot be saved...I'd just like for the grand total data to dynamically display on the invoice based on the end-user's selection. As always, I greatly appreciate any feedback that can be provided. Thanks!
  4. Thanks for the response Vitalikssssss. That's what I thought as well. I placed 'null' clause in the statement but then I get a Caspio invalid formula "expression" error. SELECT RecIDL, SUM(IsNull(RateAmount,0))FROM Invoicing_LoadsGROUP BY RecIDL (*Caspio Expression Error Invalid Formula Msg: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. ) No too sure what to do at this point. Thanks again!
  5. Thank you Mathilda. This solution worked. I know that I'm late responding. Been a while since I checked back in the forum. Bre
  6. Hello, I'm using a tabular search and report for an invoicing application where I need to show aggregations of the RateAmount grouping by the RecIDL at the bottom of the RateAmount column. I want to pass the aggregated calculated field total to the invoice using an href link to my details page. Currently the link to the details page is showing an invoice for each RecIDL. I need the RecIDL to group on the tabular search and report with the aggregated total for each RecIDL. Here are the specifics: The Table name is 'Invoicing'. I have columns for 'RecIDL' and 'RateAmount'. For example: Table Name: Invoicing (Columns): RecIDL RateAmount (Vaules): L1 $100.00 L1 $100.00 L2 $150.00 L3 $175.00 I can aggregate totals and group by the RecIDL using the aggregate caspio field; however I need this information to pass to the actual invoice so a calculated field is required. I'd like to select the 'RecID column' and sum the 'RateAmount' and then group by the 'RecID.' I've tried the following select statements. SELECT RecIDL, SUM(IsNull(RateAmount,0)) FROM Invoicing_Loads GROUP BY RecIDL (*Expression Error Msg: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. ) SELECT RecIDL, SUM (RateAmount) FROM Invoicing GROUP BY RecIDL; (*Valid Formula per Caspio verify: When html page is opened "error in formula" message received; unable to view webpage) SELECT SUM(RateAmount) FROM Invoicing_Loads WHERE RecIDL = target.[@field:RecIDL] Group by RecIDL (*Statement is grouping the RateAmount for each RecIDL. The amount is appearing numerous times on the report; the total is correct.) This is what is showing: (The total should be $200.00 for L1) (Columns): RecIDL RateAmount (Vaules): L1 $200.00 L1 $200.00 L2 $150.00 L3 $175.00 This is what I need to see: Total Aggregations for each RecIDL; preferably at the bottom of each RecIDL group. (Columns): RecIDL RateAmount (Total L1): L1 $200.00 (Total L2) L2 $150.00 (Total L3) L3 $175.00 I'm not a strong sql user so I'm not certain what the "expression" error is speaking to. Based on the knowledge that I do have I believe it should work. I have searched the forums but could not locate any information specific to my need. I'd be grateful for any assistance provided. As always, Thank you! Bre
  7. Hello. I need to pass an autovalue parameter into a pop-up window. I'm using a multi-page submission form. The second page of the form has the pop-up html block to capture the autonumber (ProjectID) generated on the parent form. My autonumber field is "ProjectID." I can view the 'Project ID' on the second page of the form; it will not however pass into the pop-up window. This is the code that I have and it's only working for new information entered. The autonumber "Project ID" field that I'd like to pass into the pop-up window is not working. All new data is going to the table except the "Project ID." Code being used is as follows: <a class="cbMenuItem"href="#" onclick="window.open(&quot;http://www.TTTest.com/brokerlookuptest.html?ProjectID=[@InsertRecordProjectID]&quot;,&quot;mywindow&quot;, &quot;menubar=1,resizable=1,width=500,height=500&quot;)">ADD BROKER</a> | Any assistance would be greatly appreciated. I've read up on parameters, query strings, pop-up windows, and used the Caspio Link Menu generator for the code. I'm thinking that something is still off with the syntax as it relates to the parameter be passed. Thanks! Bre
  8. 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
  9. I was able to figure out the formula needed to count the datediff in hours and minutes. The datediff calculation will always count the movement from one hour to the next as an 'Hour' in the calculated result in error. For example, 12:50 PM to 1:10PM will show the calculated result as 1 hr 20 minutes. The result should be only 20 minutes. This is due to the transaction number being counted anytime a new hour begins. The formula to obtain the correct result is as follows: CONVERT(varchar(3),DATEDIFF(minute,Start_Time, End_Time)/60) + ':' + RIGHT('0' + CONVERT(varchar(2),DATEDIFF(minute,Start_Time, End_Time)%60),2) The formula will present the time calculation formatted with a colon (ie., 0:20) The bolded text should be the name of the field that you are using in your application.
  10. Hello, I'm having difficulty with my time formula for a specific scenario. It is working correctly but producing too much time in some instances. I'm using a calculated field with the following formula to find the total time worked each day: cast (Datediff(hour, [@field:Start_TIme], [@field:End_Time])%24 as varchar)+' hours,'+ cast (Datediff(minute, [@field:Start_Time], [@field:End_Time])%60 as varchar)+ ' minutes' The formula is working when: The time calculated is more than an hour (i.e. 2:00 PM to 4:45 PM) = 2hrs, 45 minutes (CORRECT RESULT) or The time calculated is less than an hour but within the same hour of the day (i.e. 2:00 PM to 2:23 PM) = 0hrs, 23 minutes (CORRECT RESULT) The formula is NOT working when: The time calculated is less than an hour across DIFFERENT hours (i.e. 2:50PM - 3:05PM) = 1hrs, 15 minutes (INCORRECT RESULT) The hour should be '0' as the total time worked is '15' minutes only. I'm not sure if I can build a condition into the already existing formula(s) or if a new formula(s) is required. The standard datediff function also produces the same result. I've tried other code located online but have not been successful at removing the hour that appears in error. I've searched the CASPIO forum but was not able to locate a like issue. Any help or suggestions would be much appreciated. Thank you!
  11. Hi, Having an issue with the HTML "select datasource" drop down. The data page will default for a while but then switch to Common_LU_States as the datasource which is incorrect. I had multiple tables created which I've since deleted. The deletion was done in an attempt to have the datasource required "Reg_Auth" default in the drop down on the data page setting screen as it's completely grayed out so I can't select it. I used the Caspio "how to video" to set-up my authentication, table, and registration form with no issues. However, the HTML data page type will not allow the table selection that's required for authentication for user passwords. I can see the passwords and email information populating into the reg_auth table. However, the HTML code provided that I'm embedding into the website will work for 5 minutes tops never authenticating the passwords instead producing an error message that states "user name and password cannot be authenticated." When the form disappears only the redirect script ... <script> { window.location = "scan.html"; } </script> appears on the website. Ultimately, I have a website where users can register but not login after registering. Any suggestions as to how this can be corrected? Or, any options available other than the HTML data page for creating the login form? I greatly appreciate any help that can be provided. Best, Bre
×
×
  • Create New...