Jump to content


Caspio Ninja
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by innov2e

  1. Thank @CoopperBackpack, very interesting. I'll pursue the second, it seems more elegant and natural for user point of view.
  2. I have a pivot datapages for all invoices. I whish to hgave two search datafields like From and To where To has default today and From is 3 month backward. My feeling is that some Javascript has to be written, but before i start to, anyone know if this can be done natively?
  3. @JonSmith I made a workaround, but it was possible only because I publish Caspio pages into a Wordpress site (I do not know if it is your case). I devolped this: 1) My users authenticate themselves to Wordpress and Caspio app has no authentication. 2) I added a wordpress custom field into user's profile 3) Each datapage is filtered using an external parameter 4) Datapages are called with a small javascript (using the snippet plugin) that: retrieve the custom field and use it as URL parameter o collect build the url to embed the datapage using the custom field as URL parameter The waring point of this solution was the security because you call datapages with no authentication. But I enforced this by: a) Obviously allowing only https b) Showing nothing if the parameter is blank or wrong I am testing another security enforcment that is to add a unique key to the application: a new GUID field, I called tenant, that is unique for all records into the app. Each user will have another custom field where I manually write the GUID when I add the user. All datapages will be filtered with this GUID. I few words: two secrets better than one..... As soon I have free time I wish to write down an article about this.
  4. Thank you @Meekeee! Because in order to provide you the answer I found the culprit: I was referring a var instead of a field, so I was clearing the var instead of the field. Let me share a trick I found very useful to debug triggers: 1) I setup log table (my is i2e_log) with the fields: timestamp; Event; Source; Description 2) Then I inseret into specific points this insert with fiedls filled with var, messages or fields I want to check. Thank you again. I would have another question but it is matter for another topic.
  5. I have the classic school environment with classes and students, where class subscriptions are to be managed and each student can be enrolled on more than one classes. Up to now I have this environment: TABLES: one for students, one for classes and one that realise the many to many relation between them called enrollments. With one data page adding a record into the third table I can select the course and the student to be enrolled (It is very similar to the caspio video about triggers and tasks). But this heavy to handle when hundreds of students are to be enrolled. I whish to be able to select from students table all the student to be enrolled in a class, then it should have to add as many rows as selected students into the third table with the id of each student and the class Id. I tried combining an hidden field into the student table allowing to bulked it it, and a trigger on the update event, but I do not know how clear the field after the inserti is done. Anyone has been faced with this problem?
  6. Pheraps I miss some CSS knwoledge, it doesn't work. What do you mean for "select first two columns"? This will be independet from Field Size specified into Datapage?
  7. I know that when you define a datapage you can decide which style has to be used. But it is possible to use the style as parameter? I use two differen styles: one for display pages and another one to print them, I wish to use the same datapage passing it the style to be used. Obvioulsy it whould be possible to double the datapages, but this mean that for every change one has to remember to modify also its twin page.
  8. Hi @CoopperBackpack yes this address the issue of give access of partition of data to users and allow to overlap their acces. But is hawful to manage: when I add/change/deleta a role I must keep trak of all tables where it is used because i nedd to "mark the records to which group they belongs". This is very far from a roles native support. Roles are useful in a lot of scenarious i.e. in this post There is another scenarious but it is not handled is demanded do custom code that you need to update every role changes. More deep I read and more I believe that roles management is the weak side of CASPIO. I read also about SAML (that imply a big money cost i term of CASPIO plan) but any role handling inside the CASPIO app seems again to be done with coding ad-hoc. I wonder because even Airtable (that in my opinion is far from CASPIO) has a little role based functionality into its core (see gif below). Even if they miss too any read restrictions (there are requests to implement it)
  9. I have a lot of tables with the company field. Nowwhat I am looking for is an authorization mechanism allowing users to see only some companies. But I have two issues: 1) If I look into row level restricions I have this scenario: Some users should see onlt companies A, B, C; others shoudl see B, C, D; others hace to see A, D, E, F and others all companies. I read this Restrict Access to Data by User or Role but it seems very poor because it do not seems roles restriction, rather a data partitioning where each partition is allowed to some users. This bring up to a some limitations in others scenarious and a huge amount of data handling when users changes roles. 2) If I look into user roles restriction I do not understand how assign mor than one role to a users. In the artivle I mentioned before I seems to me that roles are implemented with DIFFERENT LOGIN SCREEN. I think tihi is a misunderstanding of mine, because this is not roles handling. This is multiple access. Let me make an example: You go into a PUB where room A and room B are reserved for two different parties and the remaining place is for everyone. Very likely you will enter in ONE pub entry and then you'll find a PUB clerk that after asking your name, check if it is on a party list and address you in the proper room or in the public ones. This organization DO NOT CHANGE even if there are more parties or none, the only thing changing is the clerk list (role assignment list). INSTEAD I have understodd that in CASPIO the PUB should open and briklayer doors according parties it hosts! It seems very strange to me develop a new loging page for each roles and instruct users to change login page for each role they have..... I miss something? How can handle overlapping roles and more inportant how can handle user's roles changes without changing data into all tables?
  10. I have a pivot datapage where I wish to resize column widht of the first and secon columns (ANNO and MESE in the screenshots). It is possible? May be with some CSS I wasn't able to find..
  11. I have the classical invoice structure with two datapages: one for the invoce data and the other for invoice details. The second one allow me to make top insert of details. 3d UPDATE: Triggers works as designed ------------------------------------------------------ vvvvvvvvvvv The data processed by a triggered action is taken from the table. And in the table, it is stored in US format (comma separated). All localizations handle only the way dat are displayed. 3d UPDATE: Triggers works as designed ------------------------------------------------------ ^^^^^^^^^^ 2nd UPDATE: this issue is over changing the javasrcipt receiving the data, the trigger one is still in place ------------------------------------------------------ vvvvvvvvvvv I whish to initialize at the beginning the top "IMP. UNIT" field value with the total contained into the "Tot. no IVA" field into the invoice (PAY ATTENTION I don't need/want to calculate the total and add it to the invoice, is a sort of viceversa) . Using parameters and a little bit javascript into invoice details Datapage I can almost do it, but the issue arise with localization. I have the Italian localization on both datapages using comma (,) as decimal separator. The web page containning the two datapages is called in this way from a third datapage: [@app:URL_root]/fatture-modifica/?ftt_id=[@field:ftt_id]&ftt_tot_noiva=[@field:ftt_tot_noiva#] where: ftt_id is the invoice number ftt_tot_iva is the numeric field This lead to call the page in this way: [@app:URL_root]/fatture-modifica/?ftt_id=5QPMRYIVEO2U&ftt_tot_noiva=166%2C09 BUT the %2C is not understood and this lead to a NaN value into the "IMP. UNIT." field I manually change into the url the %2C (the , value) with %2E (the general accepted . value for decimal separation), all works fine and the IMP. UNIT. field is initialized correctly with the number 166,09 (YES if I pass the period the datapage then localize it with comma). It seems to me a CASPIO bug, but tow can I workaround this? It is not a bug and is detailed anywhere? 2nd UPDATE: this issue is over changiing the javasrcipt receiving the data, the trigger one is still in place ------------------------------------------------------ ^^^^^^^^^^^^^^ 1st UPDATE: The same misinterpretation of localized number there is into Trigger. In the invoice table I have a trigger that concatenate supplier name, invoice number and total amount. The result is displayed with period instead of comma. You can see here in the title I have 1220.000 instead of 1200,000
  12. It’s hard to say something with this info. Where is the symbol? Typed into a field of submission form as a text? Into the url calling the page as parameter? Where you miss it? Into a search result table? Into the table field when you see it from Caspio tables? I tried it on a demo app I have (you can try it here) addin & and something’s to the address field. It seems working.
  13. MMM may be I was drunk yesteray, now when I start from scratch I get a clean one. But which is the right way to "detach" the unwoanted sharing? UPDATE: making some more tests I noticed that If Ihave Table_A belonging only to APP_A, it is not shared. If I build a relationship between Table_A and Table_1 that IS shared and belongs to another app also Table_A became shared. May be this is the culprit because I have a set of tables shared with all my apps? (i.e. State_table, Providers_table, etc.)
  14. When I start a new app I found a lot of shared tables even if it is a new app. If I display the properties of one of them I see some apps reported even if the table is not used into such apps. If I go into the share coiche of the more menu it seems that I am allowed to share not to unshare. I am surprised because I see such shared objects also into new apps. Do you have some ideas? UPDATE: I tried also to enter into an app where a table is non needed but the detach option of the More menu is greyed...
  15. @PullStackDev it seems a good solution and yor answer lead me to another similar way to reach the goal: Into the autentication configuration i set the login redirection parameter (my URL_LoginSuccess) to https:/mysite.com/?UserLoggedIn=1 the from wordpress I handle this parameter
  16. I had a similar issue. You need two fields and play with trigger: field-a Is a text 64000 displayed in read-only where all comments will be stored field-b Is a text (it would be better limit its size) used to write new comments Than you need a trigger for insert/update that append field-b to field-a (and control to leave empty field-b into records). What do you think?
  17. I have embedded my app with CASPIO authentication into a Wordpress site and app's users do not need to authenticate themselves on Wordprees. Now I would like to know if a user is logged in to the app in order to show/hide some wordpress menu items. Can I check In a caspio datapage some fiedl before login? i.e. if System Parameter User Agent is Null user is not yet logged... Anyone has been faced with this?
  18. Basically @ParkLoey suggestion works. There are some issues when there are referencial integrity rules in place using the Company field. This because when the trigger start on the insert data event of Company_tbl the record in this table is not yet there, so when caspio try to insert rows into Process_tbl return an error. And this seems the way as Caspio is designed. If future enhancements will introduce a Run action on "after insert" it should works different. BUT I found a not-so-elegant workaround to reach the goal. 1) I added a i2e_task table The Guid, Date, App, Task are mainly descriptions of WHO require WHAT (in case to use it in others apps) in my app there is App: GDPR Task: InitCompany 2) The trigger of the Company_tbl is changed to insert only a record into the i2e_task table. here cames the trick 3) I added a TASK with the logic needed to copy records from StandardProcess_tbl to Process_tbl 4) I scheduled this task once in an hour (It could be copied four times and be scheduled at xx:00 xx:15 zz:30 xx:45 (future enhancements on the schedule will make me happy) It is not very elegant, but it works and allow me to use the referential integrity also. I wrote this here just to share with all and because I am curious if someone has better way to do this.
  19. Thank for your answer. It will be a huge trigger. I will try to build a sort of template tables and copy all their content into the process table.
  20. I have a table Processes containing for each company a set of processes: COMPANY TABLE COMPANY ADDRESS EMAIL COM_AA V.Bari info@companya.com COM_BB V.Roma segr@companyb.com PROCESS TABLE COMPANY PROCESS_NAME COM_AA STD_PROC_A COM_AA STD_PROC_B COM_AA STD_PROC_C COM_AA STD_PROC_D COM_AA COM_PROC_1 COM_AA COM_PROC_2 COM_BB STD_PROC_A COM_BB STD_PROC_B COM_BB STD_PROC_C COM_BB STD_PROC_D Any company can add/delete/modify them but when a new company is added to the company table I need to insert into the process table the set of standard processes. I would like to have a 3rd table named STANDARD PROCESSES and copy all its content with the new company name into the PROCESS TABLE. It is correct to handle this with a trigger into the company table that operate such data copy?
  21. I found this that clarify it to me: "Essentially the source table is the place where the data is coming from and the target table is the place where the data is going to or the table that an action is taking place on. They do not have to be in different schema's or have a different structure to each other and in fact they could actually be the same table."
  22. Excellent! It works, I adjusted the statement in this way to handle the first insertion: SELECT ISNULL(MAX(ere_num)+1,1) FROM scn_eredi a WHERE target.scn_id = '[@field:scn_id]' Noy I have to fill my skill gap goggoling anout target.....
  23. When I insert a record, I want use a fied (named ere_ I have a table representing heirs (named scn_eredi) with these fields: the scn_id referencing a records in the will table named (scn_successioni) the ere_id is a unique id used to build relation between heirs and will tables the ere_num should be a progressive number for each heir-person related to a will To fill the third field I used in webform datapage a calculated value with this formula: SELECT MAX(ere_num)+1 FROM scn_eredi a WHERE a.scn_id = "[@field:scn_id]" I tried the statement both with [@field:scn_id], '[@field:scn_id]' and "[@field:scn_id]" with the same result. It works, but it seems ignoring the WHERE statement. When I insert a second will he do not restart numbering.
  24. Hello @TJJones, to pass users details from Wordpress to a data page accepting external parameters I use some javascript in Wordpress collecting user data and building the script used to display Caspio datapage. I use such Javascript to build, with the Worpress plugin Snippets an ad-hoc shortcode used into Wordpress pages. Here is how I work: 1. Assume that my datapage use as external parameter [@usremail] and the deploy code is <script type="text/javascript" src="https://c2xxx999.caspio.com/dp/vd9990009990009990009990099/emb"></script> 2. I create a new snippet with this code function show_my_datapage( $atts ) { global $current_user, $user_login; get_currentuserinfo(); add_filter('widget_text', 'do_shortcode'); if ($user_login) return '<script type="text/javascript" src="https://c2xxx999.caspio.com/dp/vd9990009990009990009990099/emb?usremail='.$current_user->user_email.'">display_name></script>'; else return '<a href="' . wp_login_url() . ' ">Login</a>'; } add_shortcode( 'insert_my_datapage', 'show_my_datapage' ); 3. I use into my Wordpress page the shortcode [insert_my_datapage] With this method I can use all data from $current_user and fill as many parameters I need.
  • Create New...