Jump to content


Caspio Guru
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by douvega

  1. Hi NikkiC, You can have your first group expanded by choosing "Enable data grouping by this field" > Collapsible Group (from Grouping display dropdown) > Expanded by Default Your second and third groups should be "Enable data grouping by this field" > Collapsible Group (from Grouping display dropdown) > Collapsed by Default Hope it helps.
  2. You can do something like that using the API by looping into your data. However, it seems that what you need is a relational database so you can build a Tabular Datapage and enable the inline adding option, this way, your users will be able to insert new records without having to refresh the whole page which is what you are looking for, I think.
  3. You can use JavaScript for that. Although, there are existing articles for solving this, I understand some of us wants to have a specific and quick solution so let me try to answer that for you here. You need to use JavaScript to make your sites dynamic. In this case, try by adding the following HTML/JavaScript in the header. <div id="linksContainer"></div> <script> var linkDiv = document.getElementById("linksContainer"); var imgOne = '<a href="http://www.inmetriks.com/greenmark/audit/audits-view-only/?Section=1&Audit=[@field:GM_Questionnaire_ID_GM_Questionnaire_ID#]"><img alt="Generated button" src="https://dabuttonfactory.com/button.png?t=1.+Enviro.+Management&f=Calibri&ts=18&tc=fff&hp=10&vp=5&c=3&bgt=gradient&bgc=8dff4d&ebgc=26ce61&bs=2&bc=000" /></a>'; var imgTwo = '<a href="http://www.inmetriks.com/greenmark/audit/audits-view-only/?Section=3&Audit=[@field:GM_Questionnaire_ID_GM_Questionnaire_ID#]"><img alt="Generated button" src="https://dabuttonfactory.com/button.png?t=3.+Waste&f=Calibri&ts=18&tc=fff&hp=10&vp=5&c=3&bgt=gradient&bgc=8dff4d&ebgc=26ce61&bs=2&bc=000" /></a>'; var imgThree = '<a href="http://www.inmetriks.com/greenmark/audit/audits-view-only/?Section=4&Audit=[@field:GM_Questionnaire_ID_GM_Questionnaire_ID#]"><img alt="Generated button" src="https://dabuttonfactory.com/button.png?t=4.+Travel&f=Calibri&ts=18&tc=fff&hp=10&vp=5&c=3&bgt=gradient&bgc=8dff4d&ebgc=26ce61&bs=2&bc=000" /></a> '; var imgFour = '<a href="http://www.inmetriks.com/greenmark/audit/audits-view-only/?Section=&Audit=[@field:GM_Questionnaire_ID_GM_Questionnaire_ID#]"><img alt="Generated button" src="https://dabuttonfactory.com/button.png?t=5.+Procurement&f=Calibri&ts=18&tc=fff&hp=10&vp=5&c=3&bgt=gradient&bgc=8dff4d&ebgc=26ce61&bs=2&bc=000" /></a>'; var imgFive = '<a href="http://www.inmetriks.com/greenmark/audit/audits-view-only/?Section=6&Audit=[@field:GM_Questionnaire_ID_GM_Questionnaire_ID#]"><img alt="Generated button" src="https://dabuttonfactory.com/button.png?t=6.+Local+Environment&f=Calibri&ts=18&tc=fff&hp=10&vp=5&c=3&bgt=gradient&bgc=8dff4d&ebgc=26ce61&bs=2&bc=000" /></a>'; //1 is being treated as string (for your specific case, I would prefer this way) but in case you need to do number comparisions, then you should call your field as number. if('[@field:GM_Level_ID]' == '1'){ linkDiv.innerHTML = imgOne + imgTwo + imgThree; } else { linkDiv.innerHTML = imgOne + imgTwo + imgThree + imgFour + imgFive; } </script> Let us know if it works.
  4. For adding a date, I would suggest you using a system parameter. So, change the link var line for this: var link = five + ", " + four +" - " +one + " - " + two + " - " + three +" - [@cbTimestamp*]"; Then, remove the var six line inside the function and also remove the corresponding triggering field.
  5. There are some typos. document.getElementById is singular as it can be only one Element with the same ID, whereas document.getElementsByName is plural, that is why you need to specify which object you are referring to with [x] number. Please try this and advise whether or not it works. <script> function concatenate() { var four = document.getElementById("InsertRecordEmployee_First_Name").value; var five = document.getElementById("InsertRecordEmployee_Last_Name").value; var one = document.getElementsByName("InsertRecordEmployee_HR_Section")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].value; var three = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var link = one + " " + two + " " + three + " " + four + " " + five; document.getElementById("InsertRecordEmployee_Document_Link").value = link; } document.getElementById("InsertRecordEmployee_First_Name").onkeyup = concatenate; document.getElementById("InsertRecordEmployee_Last_Name").onkeyup = concatenate; document.getElementsByName("InsertRecordEmployee_HR_Section")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Title")[0].onchange = concatenate; </script>
  6. Yes, in that case .onkeyup wont work. It is strange, please share the DataPage URL to verify it.
  7. I assume First_Name and Last_Name are text fields, For text field, instead of using .onchange event, you should use .onkeyup. document.getElementsById("InsertRecordEmployee_First_Name").onkeyup = concatenate; document.getElementsById("InsertRecordEmployee_Last_Name").onkeyup = concatenate;
  8. You have two options. API Auto-Submission script in your DataPage View this post for more help Anyways, correct format of URL using parameters can be found at https://howto.caspio.com/parameters/parameters-as-query-string-values/
  9. I tried to look for different options to resolve your issue but the only one that came up was a GET API call to count the values in table B. This way, if it is 0(zero) and alert could be fired and then you could redirect your user to Table B to add records. Most people are afraid of using APIs but it is really easy. Although, it can not be widely published due to you need to take into consideration some variables, I can offer you development assistance. Please visit my site at https://www.futuresuite.net for more information, I will be happy to assist you.
  10. After checking your site, please try the following: <script language="JavaScript"> function concatenate() { var one = document.getElementsByName("InsertRecordEmployee_HR_Section")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].value; var three = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var link = one + " " + two + " " + three; document.getElementById("InsertRecordEmployee_Document_Link").value = link; } document.getElementsByName("InsertRecordEmployee_HR_Section")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Origin")[0].onchange = concatenate; document.getElementsByName("InsertRecordEmployee_Document_Title")[0].onchange = concatenate; </script>
  11. Sure, I can help you with that. Instead of using a service as proposed, I can build a custom PHP call for you to get the data. Feel free to visit our website at https://www.futuresuite.net for further discuss your needs and provide you with the most appropriate solution.
  12. Could you provide your website link to take a more in depth look into your issue? In case you would not like to publish your site, you can also reach me at https://www.futuresuite.net Look forward to hearing from you.
  13. Hi Farnsbarnes, This can be accomplished with a GET View Rows API call. More information on building Caspio APIs can be found at https://howto.caspio.com/integration/web-services-api/rest-api/operations/view-operations/ Alternatively, you can using this third party service for creating your API calls very easy: https://www.futuresuite.net/products/api-library.php I hope it gives you some light.
  14. Hi Sudesh, Since you say you are new in Caspio JS, I would recommend you using a Details Page type for this. This will provide you a Seach page which you can use to validate those fields with minimal JS coding. If results are found, then you can redirect people accordingly or you can show a good looking message telling the parameters are not correct. Plus, for the phone number validation, you may face issues as phone formats are variable depending on the user and that is out of our control unless you format the number when it is entered the first time and it is typed on this search/validation page. In case you need help doing it, you can visit https://www.futuresuite.net and I will be more than happy to assist you.
  15. It seems you have some typos in your scripts and you should trigger the fields directly instead of the whole Caspio form, this is due you may have more datapages deployed in the same web page and all of them share the same id. Correct script would be something like this: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var one = document.getElementsByName("InsertRecordEmployee_Document_Title")[0].value; var two = document.getElementsByName("InsertRecordEmployee_Document_ID")[0].value; var link = one + " " + two; document.getElementById("InsertRecordEmployee_Document_Link").value = link; } /* Please note that Trigering_Field_ID must be changed for your actual field ID */ document.getElementById("Trigering_Field_ID").onchange = concatenate(); </SCRIPT> This should work but if you have further issues, you can visit https://www.futuresuite.net so I can further assist you.
  16. Hi MyNameIsSean, I think this may resolve the issue with email confirmation: https://www.futuresuite.net/products/api-library.php I have done such thing before so I dont see anything that prevent us this time for doing it again in your app
  17. Not sure why you would use Node js to access the API but I would recommend using this third party service to make proper API calls: https://www.futuresuite.net/products/api-library.php
  18. It may be due to you are not authenticating your Caspio calls correctly. I would recommend you using the following thrid party service to make proper calls to Caspio APIs https://www.futuresuite.net/products/api-library.php I hope it helps.
  19. You could track log in and log out actions by using API calls and write those entries into a Caspio table. Then by running a GET call you may know if user is logged in or not. For simpler and quicker API integration, I would recommend you using this service: https://www.futuresuite.net/products/api-library.php I hope this give you some light to resolve your issue.
  20. I know this is an old post but I faced this issue a couple of weeks ago. First, you should do API request through PHP since if you do it through AJAX or JavaScript you are exposing to the all users that reach your app your credentials and anyone with basic/intermediate knowledge can do pretty much anything they want with your DB if permissions are not set properly. I tackled this by looping in PHP and then sending only the data through AJAX but as you mentioned, it may take some time, plus you need to create a queue for 300 records as you dont know if a record may fail so you need to handle all this. Hard to accomplish but you can get a good PHP developer to do this or Caspio Prefessional Development can do anything you can imagine too. I would also recommend the following third party service to make proper API calls to Caspio APIs: https://www.futuresuite.net/products/api-library.php
  21. I think you can try using Javascript, specifically encodeURIComponent() You could encode only the value you are having issues with. Let me give you an example: <a id="myLink">Text to Display</a> <script> var field = document.getElementById("yourField"); var link = document.getElementById("myLink"); var encodedStr = encodeURIComponent(field.value); link.href = "yoururl.com?v1=test&v2=" + encodedStr; </script> I hope it helps.
  22. Hi, Are you trying to copy results from DP1 to a different table? Why are you trying to do that? Could you provide more details to give you a proper solution?
  23. Hi egilley, Remember that in submission pages the fields are called "InsertRecordNameofyourField". When working with detail pages it would be "EditRecordNameofyourField". Have you tried referencing this way when using update pages??
  24. I used to use a website builder. As my knowledge grows, I've realized that developing or managing your website gives you endless possibilities. I'd like to recommend learning a bit of HTML, CSS and Java since you can do almost everything you want. Besides, you would find more information regarding these universal languages rather than a website builder. It's my opinion and advice since it has worked for me.
  • Create New...