Jump to content

DefinitelyNot31337

Caspio Guru
  • Content Count

    183
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by DefinitelyNot31337

  1. Regarding the OP, I suggest to not reference from your DataSource fields ([@field:]) since you are using a SELECT statement. Secondly, try enclosing the count fieldname inside parentheses. The resulting query should look like something below: SELECT COUNT(Significnat_Other FROM tablename WHERE Significnat_Other = "Yes"
  2. Hello @Tr0Jan, I believe that Angular JS/2+ framework, similar to other popular JavaScript front-end frameworks/libraries (React, Vue), do not allow execution of external scripts (as widgets) and I haven't been able to disable this 'feature'. What I did to work this around was to deploy DataPages as iFrames. However, you would be needing JavaScript to resize and pass parameters onto your frames. In addition to this complexity, you wouldn't be able to utilize Caspio's AJAX functionality, and navigating your parent page requires JavaScript. If I assume correctly, you wanted to use Angular to create an SPA (Single Page Application) or perhaps just utilize their templating engine. If this is your goal, I would recommend moving on to a Back-End technology instead. I haven't tried using Node.JS + Express/Backbone yet, but I have had luck using Twig on Vanilla PHP. Laravel might work for you as well. I hope my response helps. Cheers! -DN31337
  3. It is possible that there is a JavaScript on the target webpage that causes the window to close. Either it is defined on an HTML Block, or set in "Destination after record submit" configuration. If this is the case, then, it is expected that the browser should have closed and is only not able to do so when opened on another window. I am assuming that the implementation was similar to this: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/add-an-option-to-a-public-facing-dropdown/ Anyway, if you have the browser open, you may open up your Dev Tools/Firebug > Console to see if you have got any error message. This should give you an idea as to where the line of code was specified. Do note that this is only my assumption and you might be implementing a different workflow. Might be a good idea to contact Caspio Support if you still can't figure it out. Hope this helps. -DN31337!
  4. Hi. I was supposed to reply to this thread then reference it to the other one but instead I did it the other way around. Try checking this link:
  5. With the recent Caspio Release 20, the features Variables and Loops on Triggers and Tasks should make this possible. This workflow is pretty advanced, the following are pre-requisites: 1.) Auxiliary (aux) table 2.) An Autonumber field in the table you would be selecting against. (Timestamps would also do, if they can be unique. But let's stick with autonumber. It's much simpler.) Below is a Trigger demonstrating this implementation. On an aux table, create an OnInsert Trigger, that: 1.) Instatiates variables: a. init (min autonumber), b. len (max autonumber), c.) ConcatText (placeholder of the concatenated Email text), d. counter (optional. To count the number of records involved) 2.) Loops through the TABLE we are selecting against, whilst concatenating the involved records. The WHILE loop does magic tricks to select the next lowest autonumber per iteration. 3.) Optional. Update the #inserted.EmailContent with the ConcatText 4.) Actually send the email. This works well on my end. *Except for the counter part. Haha. I just added that last minute. I'm too occupied in making this post comprehensible. Sorry for my bad English. Kidding aside, the EmailContent works well on my end*. ===== You can extend this trigger, perhaps, by: 1.) Adding WHERE clause to limit your DataSets 2.) Create a TASK to insert to this Aux table, therefore effectively creating reminders to your end-users. I hope this helps. DN31337
  6. Hi @Elderberg, It's true that this solution is experimental. Creating JS customizations for this feature (Inline Edit) is tricky, especially on Cascading Dropdowns. I see a lot of requests regarding that lately. I'm trying to work on it but it's harder than it looks. Anyway, for Dropdown form elements (NOTE: NOT working on Cascading Dropdowns!), I see that it's not working, but simply wrapping the script on a DataPageReady listener does the trick. Here's the code for 'ya. <script> document.addEventListener('DataPageReady', function() { // Replace [@authfield:name] accordingly with the parameter or custom value you wish. var paramValue = '[@authfield:name]'; // Replace with the name of your field as described in your DataSource var field_name = 'TableFieldName'; /* Edits are not necessary for this part */ var i_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd' + field_name); i_field.value = paramValue; /* To this part*/ //i_field.type = 'hidden'; // If you wish to hide the field as well, just remove the two forward slashes before i_field.type i_field.readOnly = true; }); </script>
  7. h3110, With the recent Caspio Release 20 comes an improvement in Triggered Actions called "Variables" and "Do-While Loop". These allow you to achieve this workflow without having to specify a dummy table. Attached are the screenshot of the Trigger, and the Table Design Used. Hope this helps. Happy H4x1ng- -DefinitelyNot31337 Tables_2019-Dec-09_0543.zip
  8. While you may be using a 64-bit Operating System, it is possible that you may be using a 32-bit MS Office. This is because 32-bit apps are compatible with 64-bit OS'es, but not the other way around. 64-bit apps run faster since it can utilize more System RAM*, so it is really helpful to know if you have support to 64-bit versions of apps. Provided that you have 64-bit MS Office, it's best if you install 64-bit MS Plugin as well. Here's another article to determine which version of MS Office you are using: https://howto.salesflare.com/en/articles/1013253-how-do-i-know-if-my-outlook-program-is-32-or-64-bit -DN31337!
  9. On your DataPage, you have the option to overwrite an uploaded file so you don't keep the same file name at once. Reference: https://howto.caspio.com/files-and-images/uploading-files-and-images/ -DN31337
  10. Do you have a Separate List DataPage and (Single-Record Update, or Details DataPage)? I assume you have two DataPages since you can't have Inline Edit on List DataPage. In this case, you would need some interface to have the two connected to each other. Let me know if you have the deployed the SRU/Details DataPage as an iframe, or as embed on the same page as the List DataPage. Also, let me know if my assumption is correct.
  11. In addition to this, we may also specify this behavior to be default (on Styles level) so you don't have to specify the customization every time. To do so, locate your Styles first, but before modifying it I would suggest to duplicate the current style as backup. Once you are in the Styles configuration: 1.) Click on Source Tab 2.) Select All from DataPage Elements 3.) Look for cbTableDefaultCellspacing 4.) Add the rule: margin: auto; Below is how it should look like: Once this is saved, your DataPages with this localization will be centered with respect to its container I hope this helps. -DN31337!
  12. Hi @JanineB, You may also upload external files to your Caspio Account then reference it on your DataPages. You may also do this on other files such as css, images, etc... Hope this helps
  13. First, I'm not sure why you had to do Full Name and Full Address on your Work Order table when you can structure it the same way as your Clients table (with First_Name, Last_Name, etc... on separate fields). === I haven't reviewed the table design and workflow as well. Haha. But I wanted to mention that formula field values can be referenced in the trigger (Read-only). This means that if you are able to separate the fields you need on a formula field, you may simply set First_Name_Text255 = #inserted.First_Name_Formula on your trigger. Hope this helps -DN31337
  14. Hi @NeoInJS, Having the date field default to first day of the month, and have the field be editable at the same time is currently not possible in Submission Forms without JavaScript customization. Too keep things simple in cases of "editable-default" value , I usually just setup a Virtual Field that is a placeholder of the custom user-input value, then have a Calculated Value for the actual field to be either the "user-input value", or the default value if it is blank. You may do so by following these instructions: 1.) Create a Virtual Field that will hold the user-input values. (I would suggest creating a not for your users that say "Defaults to first day of the month"). 2.) For the actual date/time field, you may set the Form Element to a "Calculated Value", then use the syntax below (For this example, I assumed that you use Virtual 1 as your placeholder): CASE WHEN DATALENGTH('[@cbParamVirtual1]') > 0 THEN TRY_CONVERT(date, '[@cbParamVirtual1]') ELSE DateAdd( day, 1 - DatePart(day, '[@cbTimestamp*]'), '[@cbTimestamp*]' ) END Hope this helps. -DN31337
  15. I agree that a feature like this is really a must-have for the platform. Meanwhile, for everyone's appreciation, we may also utilize Pivot Tables for the meantime. Add your distinct-to-be field in the Row, and your date for Values. Then set the summary to Max Do note, however, that Pivot Tables' performance becomes terrible as the DataSource grows. Less that 10,000 should work fine.
  16. Hi In addition to my response here, you may also check my latest solution which dynamically sets the height of the iframe based on its content. Hope this helps -DN31337!
  17. Hello @Didier, I was able to formulate a working solution by putting together workflows from external resources. On the Footer of the DataPage you want to deploy as iframe, paste the snippet below (Make sure HTML Editor is disabled from the Advanced Tab). //Script tested on Tabular Report <script> document.addEventListener('DataPageReady', function() { parent.postMessage(document.documentElement.scrollHeight, "*"); console.log(document.documentElement.scrollHeight); }) </script> On cases of Submission Form / Details Drilldown, you may want to put the snippet below on an HTML Block instead. //Not tested <script> parent.postMessage(document.documentElement.scrollHeight, "*"); console.log(document.documentElement.scrollHeight); </script> Then, on the page where you will be embedding the iframe, place this code snippet: Replace iframe src with the URL Deployment of your DataPage <iframe id="ifr-cdr" src="https://xxx.caspio.com/dp/2abe231b344545ff9945230aaaeeffccc" frameborder="0">Sorry, but your browser does not support frames.</iframe> <script> // Create IE + others compatible event handler (Credits to: https://davidwalsh.name/window-iframe) var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; var eventer = window[eventMethod]; var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"; // Listen to message from child window eventer(messageEvent,function(e) { document.getElementById('ifr-cdr').height = e.data; },false); </script> Works for me. Hope this helps. -DN31337!
  18. @Batchini, you may also consider this solution. 1.) Create a view. INNER JOIN on Table1.Project_ID = Table2.ProjectID. 2.) Create a Pivot Table using the View on item#1 as your DataSource 3.) For your rows, use Table1.ProjectName 3.) For your values, use Table2.Status; then set "Summarize values by:" to Min Hope this helps -DN31337!
  19. If you intend to filter your Parent records based on min(FieldName), Triggered Actions would be the way to go since Caspio does not have the capability to filter a report by a Calculated Field as of the moment. Also, it might be worth mentioning that Triggered Actions are not available on Explore plans x). --
  20. Hi @NickO, I agree that doing 15 Calculated Fields is better in performance the more complex Pivot Table. To my knowledge, I believe this is the most optimized solution we can implement. You just have a big amount of data. === You may want to consider "caching" your results by creating 15 integer fields (corresponding to each of your criteria) on your table, then populate it either by Tasks/Triggered Actions. Sorry for the late revert. Do feel free to tag/mention me with the "@" sign so I get notified when you respond.
  21. Hi @kristina, I believe you need to remove the space between thisDP and .querySelector. There are two instances of this in your code which results to a syntax error (^_^)v In addition, everyone else may also try this version of JS by putting this on an HTML Block in their search form: <script> var thisDP = document.querySelector(`[action*="[@cbAppKey]"]`); thisDP.addEventListener('change', function() { console.log('Changed!'); thisDP.querySelector('.cbSearchButton').click(); }); </script> This will automatically hit search everytime an input value has been changed, then put out-of-focus. Hope this helps. -DN31337!
  22. Try checking Aggregation and Pivot Table Reports. https://howto.caspio.com/getting-started/advanced-reporting/advanced-reporting-1-of-2-grouping-and-aggregation/ https://howto.caspio.com/getting-started/advanced-reporting/advanced-reporting-2-of-2-calculated-fields/ https://howto.caspio.com/datapages/reports/pivot-table/ https://howto.caspio.com/getting-started/create-a-pivot-table-report/ You may need to create a separate DataPage for each reporting aggregation (i.e. Monthly, Yearly) As for per individual, departments, company overview, looks like you just need to setup the correct filter to the processed Data
  23. Hello Arnold. You might want to check my answer to this thread: The workflow above would be just one part of your solution since it only just allows you to duplicate a whole form, not a section. I'd suggest partnering that one with multi-step forms/one-to-many relationship so each section of your form is a different DataPage, and you can duplicate as needed. https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-create-a-multi-page-form/ https://youtu.be/J6dBPuipaNc https://www.youtube.com/watch?v=Hgflq6tUliU https://www.youtube.com/watch?v=IstAk982ntA https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-create-a-one-to-many-relational-datapage/ -DN31337!
  24. I also think that is currently not possible. I was thinking of a Cascading Trigger workflow would do the trick, but unfortunately, it doesn't. Below is how I simulated it's runtime. === The children table, on record update, would append the value of the updated record to its corresponding parent in the parent table This Task should initially clear out the values in the parent table; After that, update each record in the child table so the trigger would be executed for each record. ==== However, it appears that the "Update child" action on the Task only runs once. They are populating the #inserted temp table with records so only the Top 1 record is written onto the parent table. Not sure if my explanation is clear enough or if you get the gist of it but I hope this helps. Regards, ~DN31337!
  25. The listener on the element should be "change". In addition, I'd recommend using a Query Selector wildcard since AJAX Loading generates a random suffix for the attribute. Finally, while arrow functions () => {} look more neat, this doesn't work on IE11 and lower browsers. Putting it all together and updating George43's code, try this and see if it will work: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector('[id*=InsertRecordSource_Shift]').addEventListener('change', function() { //your function body } }); </script> Hope this helps. -DN31337!
×
×
  • Create New...