Jump to content


Caspio Ninja
  • Content Count

  • Joined

  • Last visited

  • Days Won


Niranjan last won the day on April 12 2016

Niranjan had the most liked content!

About Niranjan

  • Rank

Recent Profile Visitors

386 profile views
  1. :-) how did you discover this! sounds like a feasible Plan B if they can't fix it for me....thanks again
  2. OK good point, so I checked this out and the results are: - I don't have any bulk options enabled. However, thinking conceptually grid edit is the same thing so I tried to check for that. - I do use grid edit often, and yes the AJAX "ticked and greyed" does depend on whether you have grid edit on or off. - Having said that, turning off grid edit did not help solve for the original problem. Plus even if it did, that would be some progress but still short of where I need to be because I do need to use grid edit. Any other ideas? This is really helpful and really appreciated. The original issue will hopefully get fixed but these ancillary discoveries are useful in their own right! Best regards
  3. Thanks Jan, in fact I had a call with Expert Services and another with Professional Services at Caspio, we investigated the same setting - AJAX - incidentally it is ticked and greyed out, so I can't change it. But the important thing is that it is ticked so it should have worked. PS folks are looking into why it was ticked and greyed out automatically, and more importantly why it is not working even with a tick here. Best regards N
  4. Actually too many parameters and putting them in field across too many pages will need a lot of renormalisation which I was trying to avoid. Also this reload refresh is not consistent - when I explicitly refresh parent from a pop-up sub window this problem doesn't happen!
  5. Ok - not ideal because I may need to allow 100 as a valid number, but must say creative thinking and good plan B if nothing else works thanks :-) how about preventing negative values?
  6. I need to ensure that values in a column in a tabular report are between 0 and 100 (They are meant to be a percentage impact figure to be entered by the user). I studied the JS example of creating column totals in a tabular report (see http://forums.caspio.com/index.php/topic/3171-js-calculate-column-sum-in-the-result-page/ ) and modified the code as follows, but I cannot get the script to fire at all. I added a number of debugging statements to no avail. I have tried an "onsubmit" type of call as well, apart from the below example. Ideally there should be a way to fire this at the end of adding / editing each row, but I could live with at the end of the whole page as well. At the end of the Header: <div id="cb_checkImpact"> At the beginning of the Footer: </div> <script> function f_check() { alert('Inside function'); var v_impact = 0; var cas_form = document.getElementById("cb_checkImpact"); if (cas_form.getElementsByTagName("table").length > 0) { alert('Found records'); var cas_rows = cas_form.getElementsByTagName("table")[1].getElementsByTagName("tr"); for(var rowIndex=1; rowIndex < cas_rows.length; rowIndex++) { alert('Inside row loop'); var cells = cas_rows[rowIndex].getElementsByTagName("td"); /* 1 – change value inside brackets to choose column to perform validation */ v_impact = cells[2].innerHTML; alert('Found value:'); alert(v_impact); if ( parseFloat(v_impact) < 0 || parseFloat(v_impact) > 100){ alert('Value in %Impact field must be between 0 and 100'); return(false); } alert('No issues found'); } } alert('About to call function'); f_check(); alert('Finished function'); </script>
  7. I have a number of instances of the user moving from one tabular report on a parent entity, by clicking on one of the records, to go another tabular report on the child entity. I am passing parameters through the query string. I have noted that if I happen to delete a record in the parent tabular report, and THEN click on some other record to drill into the child tabular report, then only the parameters of type [@field:XXX] get passed correctly, and other parameters of type [@XYZ] get dropped. This dropping does not happen if I have not deleted any record in the parent tabular report. This functionality is deep inside the app and you can't replicate the issue by simply going directly to that page so I am not including any URL at this stage. I have raised a trouble ticket as well in parallel. This has become urgent, appreciate the help.
  8. Hi Jan I have found the issue (yay!), certainly this particular page is fixed now and I will use this to address all other instances and hopefully not come across a new problem. Not surprisingly it was a silly coding error! When I changed from getElementByID to getElementByNames[0], I had forgotten that in the syntax of getting "by name", the word "name" is plural which is different from "ID" which is in singular. So my code was saying getElementByName instead of getElementByNames. !!!! Regards Niranjan
  9. Hi Jan Just tried that too, put alerts after each statement and also tried with both the old style email in the code as well as completely removed, and still got no alerts at all. Then I tried just a "I am here" alert in the script before any other statement and that worked! Which means the script is firing, but actually neither method of extracting the email is working. I tested with just Project ID and that worked fine, of course it does not achieve the purpose of the whole step. So basically I am unable to extract the email field by either method and JS just stops there without error messages. Thanks for persisting with my problem! Best regards Niranjan
  10. Hi Jan, I tried but to no avail. Interestingly, I did the following, and the alert did not fire at all suggesting the on submit call is not firing for some reason at all. I also put both ways of accessing the value, just in case, but like I said no alerts came to the screen. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var PermittedUserEmail = document.getElementByName("InsertRecordPermittedUserEmail")[0].value; var oldstyleemail = document.getElementByID("InsertRecordPermittedUserEmail").value; var ProjectID = document.getElementById("InsertRecordProjectID").value; var ChkUnique = PermittedUserEmail + ProjectID; document.getElementById("InsertRecordChkUnique").value = ChkUnique; alert(PermittedUserEmail); alert(oldstyleemail); alert(ProjectID); alert(ChkUnique); } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  11. Hey Jan Ok here goes; The first URL is for a form that works fine (that is, stops entry of duplicates by concatenating two fields and trying to enter the result into a 3rd field which is set to "unique" at data base level. The second URL doesn't work even though it has the same structure. I have removed the "unique" flag in the database for that one, so as to see if it sets any value at all, and I keep seeing blanks there. URL for page that works: http://c0ect399.caspio.com/dp.asp?AppKey=c22e3000371b2d8e8ac641b0b5cc URL for page that doesn't work: http://c0ect399.caspio.com/dp.asp?AppKey=c22e3000d167695596a349d78fd6 Hope this helps and thanks again! Niranjan
  12. Hi Jan The Email field is a cascade DD. I read up on the Dynamic link you sent, thanks for that. To explore if this is the issue, I tried changing the concatenation to another field in the same table (not a cascade DD but just a normal Drop down) and I still have the same issue. I can send you the URL but how would that help? You would need to access it only via the app, without which on-load parameters and all that won't work. And using this feature via the app will need some context in what the app is doing. I am more than happy to provide that but I suppose that will soak up time on your part that you may not have :-) By the way thanks for pointing out the silly mistake in the date check !!!! Has to be the oldest mistake in the programmer's book? Best regards
  13. Hello Jan The PermittedUserEmail field is text, just like the Tag Name field in Script A, so I was expecting it to work in exactly the same way. They are also both drop-downs, and not free text, not that that should matter but anyway what I mean is the scripts are the same in every way except for field names and the page on which they occur, yet one works and the other doesn't! On Dates, yes they are both editable, yet it is not working. Thanks for looking into it! Best regards
  14. Thanks, I will give this a go, interesting approach! Will let you know how it works. best regards
  15. I am working with Submissions, Single Record Update and Details pages, where I understand the following script (and it's variants) should work. However the behaviour is not consistent. A) The following works just fine (helps ensure unique "Tag Name" within same "Project": <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var TagName = document.getElementById("InsertRecordTagName").value; var ProjectID = document.getElementById("InsertRecordProjectID").value; var ChkUnique = TagName + ProjectID; document.getElementById("InsertRecordChkUnique").value = ChkUnique; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> However the following, in another page but with pretty much the same logic (need to ensure unique PermittedUserEmail for given project), doesn't work (there is no value inserted into the ChkUnique field in the database, unlike the first case) <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var PermittedUserEmail = document.getElementById("InsertRecordPermittedUserEmail").value; var ProjectID = document.getElementById("InsertRecordProjectID").value; var ChkUnique = PermittedUserEmail + ProjectID; document.getElementById("InsertRecordChkUnique").value = ChkUnique; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> C) Also, the following, though a different context and logic, doesn't work either: (This is a Details page so I understand InsertRecord needs to change to EditRecord) <script> function chk_date(){ var startdate = document.getElementById("EditRecordStartDate").value; var enddate = document.getElementById("EditRecordEndDate").value; if ( Date.parse(startdate) < Date.parse(enddate) ) { alert('Start Date must be less or equal to than End Date'); return false; } } document.getElementById("caspioform").onsubmit=chk_date; </script>
  • Create New...