Jump to content

kpcollier

Caspio Rockstar
  • Content Count

    389
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by kpcollier

  1. The attachment tab already has this feature. If there is an attachment box on your form, you can drag a file to it instead of clicking browse. Maybe mess with the css of the field to make it bigger to let users know of the feature.
  2. Hey all. I am working on this Back button. Two different levels of users for this app - Users and Editors. They both use the same details datapage for records. I have a back button that takes the users back to the Tabular Report results page, however this is where I need to redirect the users based on an auth field. Here is what I have. It does take you back to the Users Report version, but when the auth field is true, it does not take you to the Editors Report version. Any help is appreciated. <input type="button" class="rsAddNew" name="drop" id="redbutton" value="Back"> document.getElementById('redbutton').onclick = function() { if ("[@authfield:Employee_Table_ResourceCenter_Editor^]" == 'Yes') { window.location = "https://00000000.caspio.com/dp/e750500039f-------------"; } else { window.location = "https://00000000.caspio.com/dp/e7505000ba817---------------"; } return false; }
  3. If anyone could help me out with trying to format this, it would be great! ALL of my JS calculations are coming out as just a number. (i.e. '12345.678' instead of '12,345.68'). I think it is because I am manipulating the numbers through the js script above, so it is just ignoring the formatting options. I am not sure. All of the Totals fields are currency datatype, but they still show up as just a number. If there is anyway I can format it as USD currency, that would be great. TIA
  4. I couldn't get it to work. Maybe it is because I the values in the fields I am trying to format are involved in custom js calculations? I am taking an inputted number, multiplying by a few different percents, and the total of that is the value to these fields I am trying to format. They still spit out a number with 3 digits after the decimal point and no ' , ' after 3 digits. To see the custom js calculations, go here. Vitaliks had also helped me with some bugs in that code.
  5. I could also use a currency formatting option for multiple fields. Having a field type and/or format set to currency in the wizard doesn't work for JS computed numbers.
  6. I was originally using calculated fields for this page, but because I have so many of them, it made the loading speed incredibly slow. This is used for estimating so I need a ton of dropdowns and calculations on a single form. Thank you for the updated code - I greatly appreciate it!
  7. There is a post about this in the ideabox here. Not sure how often they actually check that page but it might help somewhat. I want this feature as well.
  8. IMO, It is still unbelievable that the 'leading' no-code platform does not support a document/pdf style datapage. All these work-arounds to get a page to go to PDF/make a document really shows the age of Caspio's infrastructure.
  9. Also, I have read that parseFloat is not good practice for calculations. However, when I try parseInt or anything else, it just adds up the fields like strings. So 2000 + 1234 would be 20001234 instead of 3234.
  10. If someone could help me with a couple of things: 1). When the page first loads, all of the Total fields start with NaN. Is there a way I can start them out as blank, or 0? I tried putting in a placeholder, but it still doesnt work. 2.) I cannot seem to figure out how to get the currency format to work on these Total fields. The SubTotal ends with 1 digit after the decimal point, and the County Tax Total often has many digits after the decimal. Is there a way I can format all of these Total fields as currency? They are already set as Currency DataType and I have the app localization set for currency as well, to no effect Thanks again. //Virtual 13 is the new subtotal after calculations document.addEventListener('DataPageReady', function (event) { function calculate() { var subTotal = parseFloat(document.getElementById("InsertRecordSubtotal").value); var markUp = parseFloat(document.getElementById("InsertRecordMarkUp").value); var countyTax = parseFloat(document.getElementById("InsertRecordCounty_Tax").value); var miscPerc = parseFloat(document.getElementById("InsertRecordMisc_Percent").value); var freight = parseFloat(document.getElementById("InsertRecordFreight_Total").value); var markUpTotal = document.getElementById("InsertRecordMarkUp_Total").value = (subTotal) * (markUp); var countyTaxTotal = document.getElementById("InsertRecordCountyTax_Total").value = (subTotal) * (countyTax); var miscPercTotal = document.getElementById("InsertRecordMisc_Percent_Total").value = (subTotal) * (miscPerc); document.getElementById("cbParamVirtual13").value = (subTotal) + (markUpTotal) + (countyTaxTotal) + (miscPercTotal) + (freight); } setInterval(calculate, 1500); });
  11. Pictures of the Material and Labor fields for better understanding.
  12. I work in a subdivision in Construction. We bid on construction jobs. I am trying to add an estimating app to our fleet of Caspio apps. The problem I am running in to is my Estimate_Table is friggin' huuuuge. First, we need at least 10 spots to list out the materials we are planning on using for the job. So, we have a field to list what material it is (x10), plus a field for the currency total of how much the material costs (x10). This takes up 20 fields, plus a final 'Total' field to add the sum of all together. Now, the big part. For each material listed, we have to list labor charges to fabricate and install the materials. So, in reality, I would need 20 labor fields to cover the Install and Fab of each material. It would go like this: Material 1: Glass Windows, $2000. Labor 1: Glass Windows, FAB, $1000. Labor 1: Glass Windows, INSTALL, $1200. However, with each Labor field, we don't just put in a currency number for the total. We do it by how many hours it will take x the currency rate of the labor. Meaning each labor line will have 5 fields each. a Labor field to choose what material it is for, the phase (install or fab), the hours needed for the labor of this material, the rate charged, and the total. The labor lines alone would take up 100 fields. Material 2: Aluminum, $2000. Labor 2: Aluminum, FAB, 10 hours x $45, $450 total. Labor 2: Aluminum, INSTALL, 12 hours x $50, $600 total. Please keep in mind - the actual material values are coming from a lookup table already. So, the Materials fields mentioned above use a lookup table to get its material value. I am also trying my best to keep this on ONE submission form - not a multi step form. The reason for this is because our estimator will need to be able to look at the material section and the labor section simultaneously while he is doing his work. I am using collapsible sections to keep the form smaller in size. I am also using making all calculations with custom JS. I orginially had it with calculated fields, but the load times were around 2 minutes. Changing it to all written JS improved the times to 30 seconds, which is still way too long for me. I believe the reason my app is so slow is because my main table has 150 fields in it. Sorry for the long post. Just looking for some insight if anyone has made something like this and could give me some pointers on a better way to build it.
  13. kpcollier

    Estimate app

    Over a year later, I am finally coming back to this. My problem with this is that in my line of work, we have a TON of materials that can be included in our bid. Different types of metal, glass, frames, etc. My Estimates table has over 150 fields in it. The submission form needs to have access to most of these fields. I need more-than-enough input fields because the sizes of the jobs we bid range from small to very big - so wee need access to as many inputs as we can get. At first, I did the entire sub form in calculated values to get it to work. It looked awesome, the function was great, but the speed of the page was horrendous. Every number change you made would take ~3 seconds to update the page. Definitely not user-friendly. So, I tried changing the calculations to JavaScript. There is a ton of calculations, to remind you, so I haven't got through them all (probably about 80% of the calcs are now through JS) but this really hasn't helped the speed of the page. It still takes over 3 seconds to open it. One thing that would help a TON is if I could somehow find a way that my internal users could upload an excel sheet (the way estimates are made as of now) and have it populate the form, or just populate straight to the table. This way we still have all of our number figures that we can run reports off of, but the system of making the estimate doesn't change. However, I do not believe that is possible. If anyone has made any sort of app like this, I would love to hear how you did it! I am open to anything.
  14. I believe it is 2 emails. Each additional address in the TO: section is another email. Unfortunately you cannot group together multiple people per email or just send one email with a lists of results.
  15. In the same tabular report, you can insert a Calculated Field column and use a formula to calculate the sum on each line item. These formulas are very versatile. If you are experienced with with JS, using an HTML block and using JS to do the calculations is a liiiiiiittle faster than using Calc Fields. Should only matter if you use a lot of them.
  16. Sorry, I didn't update this forum post when I was messing with this app. I decided to forego removing the cbSubmitContainer and keep it in tact. Another way to achieve using the Submit button as next, is to change the Localization on all steps before your final page. In Localization you can change the Submit button name to Next. So, it looks like the Next button, but it submits the record while the query string pulls up the same record on the next step. Hope this is making sense.
  17. You can create a tabular report datapage. You can include a search box to filter by date or more if you want to. On the Results page of the datapage wizard, click on the field picker on the bottom and add in Totals & Aggregation. You can pick the field/column to use in the totals, which would be your transaction amount. Set this to Sum and you will have calculated total on the bottom of the report.
  18. I believe it does matter. I don't have time to dig up the post, but there is one regarding this issue somewhere on these forums. If I remember it correctly, the loading times for filtering via datapage were much faster than the loading times with views. I believe when you create a view, you are creating another table. When using your datapages, you query to the view, which then gets the values from the actual table, and then sends the information. When using datapage filtering, you are going straight to the source.
  19. I used some JS that opens a popup in the center of the screen. This script includes functionality for dual screen users, which 95% of my users have. It works awesome, except for one downfall - when you click the popup link, it refreshes the parent page. I usually have my popup links on my results page, so when clicking the popup link it refreshes the results page and kicks the user back to the Search Form. I am hoping one of you JS Wizards can help me identify the culprit in the script. Maybe it is obvious, but I personally don't see anything in the script that would cause the parent page to reload... But it only happens when I set the popup button to the OpenPopupCenter function onclick. If I remove this and just use a regular href, it doesn't refresh. function OpenPopupCenter(pageURL, title, w, h) { // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX; var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var systemZoom = width / window.screen.availWidth; var left = (width - w) / 2 / systemZoom + dualScreenLeft var top = (height - h) / 2 / systemZoom + dualScreenTop var newWindow = window.open(pageURL, title, 'scrollbars=yes, width=' + w / systemZoom + ', height=' + h / systemZoom + ', top=' + top + ', left=' + left); // Puts focus on the newWindow if (window.focus) newWindow.focus(); } TIA, KPC
  20. Is this in iOS? And, what is your deployment method? I had a similar problem before with iOS not scrolling or clicking on dropdowns. I was deploying through iFrames, though. <style> html, body {height:100%; overflow:hidden} body {overflow:auto; -webkit-overflow-scrolling:touch} </style> I used this on the datapage to fix the scrolling/click issues I was having with iFrames.
  21. Hey @Mikey, Everything runs off of parameters. You need a datapage for each step, and an extra datapage for going back to 'Step 1'. The reason for this, the first step is always a submission form, and the following steps are always single update forms. If you were to click 'Previous' to go back to step 1 without making an extra Single Update Form for it, it will just make another record instead of editing the first. On the first step, submission form, use the 'Destination and Messaging' (the last page of the wizard) and put in the link to Step 2. Now, when you click the Next (submit) button, it will go to that page. For the Previous button: <input type="button" value="PREVIOUS" class="previousButton" onclick="location.href='https://c3eku680.caspio.com/dp/e1234123412341234?CG_ID=[@EditRecordCG_ID]';" /> The Value is the text displayed on the button. The link in the href is the url to your previous step. Change the 'CG_ID' and the CG_ID Field to your own ID field. Do this for all of the previous buttons, but make sure to change the URLs for different steps. For the Next button, it is simple: <input class="nextButton" type="Submit" value="NEXT" /> The Type will make this a submit button. The Value is the text displayed on the button. When you are using the 'Next' button, you are really submitting the datapage and bringing up the next step, so you want to leave the Type as submit and just change the Value to Next. For the steps after 1, to go to the next steps, keep using the 'Destination and Messaging' page to set the destination URL to your next step. What I did here for my steps 2-4 is add the next step's URL plus the ID in a parameter, and then on the next step's DataPage Wizard I used 'Find Record Through Unique ID' to receive the ID parameter that was just sent (I think Single Record Update forms make you set this, it is one of the first pages in the datapage wizard). When using the ID parameter in the query string parameters(URL), you need to use [@EditRecordYourID], and then in the DataPage Wizard for 'Find Record Through Unique ID' you use [@InsertRecordYourID] If you need any more help just let me know!
  22. Usually you want to put the JavaScript in the footer of the page. This allows all of the DOM elements to be loaded before the JS.
  23. Sorry @GWBjr, I have been super busy today. You have to make a field Multi Select from the table itself. When you first created the field, it asks for DataType. These are Text(255), Text(64000), File, etc. There is a Multi Select List option. To create the link to the submission form, you are going to have to create an anchor tag with an href to the submission form, and use query string parameters to send the Lender data over. There is more information about query strings and how to build them here. I can help you out more when I get some more time.
  24. Yes, create a third table that will take in the submissions form your users. Your third table would have a combo of information from your prior two: you need to include the ID for the user (you should have an ID field on your user table), anything else you want to include probably like name and email or something, then fields that are for the offerings. UserID | Name | Email | Offering | You would probably use a Multiselect List datatype for the Offering, so that the user can select multiple of them at a time. When creating the submission form, use the source table as your new third table. For the offerings field, make it a multiselect listbox/dropdown and use the Offerings Table as your source. You can make the UserID receive an auth parameter on load, so that the user's information will get submitted too. If you need any more help don't be afraid to ask.
×
×
  • Create New...