Jump to content

Niranjan

Caspio Ninja
  • Content Count

    26
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Niranjan

  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 am solving for dropping of external parameters when rows are deleted in-line in a tabular report. I have noticed that actions taken in a pop-up sub window do not create this issue, so I am thinking of replacing the native "in line delete" with a custom link which opens a pop-up and brings up another tabular report listing with just that one record (selected on primary key being passed in as parameter) which is where the delete happens, after which perhaps I can fire a "refresh parent" command before exiting that pop-up. The problem is that the user will be forced to re-confirm the delete, which given this scenario will feel like they were asked the same question twice. Is there a way to disable this delete-confirmation window?
  7. When a user resets their password they get an email and a link in it. On using that link, a page comes up with just the password field and it's confirmation field. How can I add header / footer / branding / formatting to this page? Note that this is NOT the password reset page, but the page that fires after using the password reset page.
  8. 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>
  9. 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.
  10. There doesn't appear to be any way to bulk insert records in the API - is there a way to achieve that other than to loop through in the code at the other end?
  11. I am trying to implement logic on search fields such that the same column needs to be compared to two different values with an OR in between - like USERNAME = null OR USERNAME = [@authfield:USERNAME]. It is not accepting such entries; the auto editor keeps changing both the OR branches to equate to the same thing. Is there a way to implement such logic?
  12. 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
  13. 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
  14. 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>
  15. I am working on a Details page (but the same question can apply to Submission and Single Record Update also) and need to control the width of each "column" when I set a section to have more than one column. Without this control, the columns that are being auto generated are too wide and create a horizontal scrolling situation on the page which is avoidable because there is a lot of vacant space. I could not find a place to control the width of columns in a section.
  16. 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
  17. 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
  18. 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
  19. Thanks, I will give this a go, interesting approach! Will let you know how it works. best regards
  20. 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>
  21. Yes I want to update the third column with the concatenation of the first two columns, wherever either of the first two get modified in any way, whether insert or edit / update. The column names should not really matter, since I can change that to suit the situation if you can show me a way, but since you ask, the three columns are called ProjectID, ProcessName, and ChkUnique. The value in ChkUnique (which remains hidden) needs to be ProjectID+ProcessName, whenever either ProjectID or ProcessName changes in any way. I will set ChkUnique to be a "unique" field at the database level. That way, for any given ProjectID, the user will be forced to chose ProcessNames which are unique within that Project, but you could have the same ProcessName appear again in another ProjectID. (It is like you can't have the same file name twice in the same folder, but you can have the same file name used again in another folder). Hope this helps, and thanks for looking into it! Really appreciate it. Best regards
  22. I need to combine two (at times more, but once I can resolve for 2 I can easily extend) fields into a third field and commit the value back into the database, all the while working with fields in the results page of a tabular report. The example on the forum, ( http://forums.caspio.com/index.php/topic/3200-js-concatenatecombine-two-fields-into-one-field/ ) , is good but only for submission forms, and the comments on extending it also apply only to update forms or detailed pages of tabular reports. So basically it can't work within a given row in a table as it stands now. I have also checked out the example in ( ) but this one is about totalling a column across multiple rows, and it anyway doesn't commit the results to the database, whereas I need to combine multiple columns across the same row, AND commit to the database. Combining the learnings from the above two examples, I have tried as follows but it is not resulting in any value being inserted in the target field, and my suspicion is I need to do something different in the very last statement of the function. Please advise. 1. Added an HTML block at the top of the list of fields (so effectively the first column in the tabular report) containing: <div id="row_at_a_time"> 2. Added an HTML block at the end of the list of fields (so effectively the last column) containing: </div> <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var ProcessName = document.getElementById("row_at_a_time").getElementByTagName("Table")[1].getElementByTagName("tr")[1].getElementByTagName("td")[1].innerHTML; var ProjectID = document.getElementById("row_at_a_time").getElementByTagName("Table")[1].getElementByTagName("tr")[1].getElementByTagName("td")[6].innerHTML; var ChkUnique = ProjectName + ProjectID; document.getElementById("row_at_a_time").getElementByTagName("Table")[1].getElementByTagName("tr")[1].getElementByTagName("td")[6].innerHTML = ChkUnique; } document.getElementById("caspioform").onsubmit=concatenate; </script> Note that: - The first [1] in each of the statements is something I don't understand but have simply followed the example - what does it refer to? - The second [1] in in the place where the example uses "row_index" so it should help point to "current row" since we have declared each row of the tabular report as a single-row-table (I believe row indexes start at 1, and not 0, unlike column numbers?) - The last number in each of the statements ([1], [6] and [7]) points to the column numbers and means I am setting column [7] to be the concatenation of [1] and [6]. This will have to be customised for each use of this method in various tabular reports. However I think I am missing the equivalent of "insert record" aspect of the following statement and just setting the variable doesn't complete the job: document.getElementById("InsertRecordChkUnique").value = ChkUnique; And therefore this method is not working. Any thoughts? Incidentally I am using this method to enforce uniqueness across multiple columns, so for example column A and column B are individual not unique but column B needs to have unique entries for all records for a given value of column A. I am concatenating the two columns and forcing the value into a third column (hidden from users) which is set to "unique" so that the user is stopped from committing such records. If you know of a different way to achieve this which does not need the above solution, that too will solve my original problem anyway. And the key is to make this work in tabular reports, not just submission or update forms. And it needs to fire on insert as well as update. Many thanks!
  23. I noticed in my app that Logout & destination are not working; probably some minor issue in how I am using the feature – I am using the URL http://bn.caspio.com/folderlogout but it doesn't seem to log out the user nor does it implement the destination I have provided
  24. How do I achieve the following: Page footer HTML should ideally be at bottom end of physical screen even if amount of data on the page does not fill the screen consistent width of various objects / divs and also change them based on multiple screen sizes or device types get information on ideal image resolution for logo and footer branding that is consistent with Caspio UI Any method to do the equivalent of “include†in HTML blocks to enable maintainability of HTML code
  25. I am creating a web service profile to be used in working with the API. Looking at the documentation on the below link I should get a WSDL URL and a Pass Key. However the actual screen to create profiles does not have either of those fields, and instead has Client ID and Client Secret. Are these terms interchangeable, and if not, where do I get the URL and Pass Key from? http://howto.caspio.com/managing-your-account/internal-users-groups-and-api-profiles/creating-a-web-services-api-profile/
×
×
  • Create New...