Jump to content

bookish

Caspio Ninja
  • Posts

    29
  • Joined

  • Last visited

Posts posted by bookish

  1. HI Alison,

    The results should only be NO SIGNUP YET, SIGNUP HERE and SIGNUP CLOSED.

    Hence: please remove  any reference to waitlist like:

    a. here in else if([@field:attendees] < [@field:max_attendees])

    b. or here in test=test+'">Waitlist me</a>';

    c. the last part should just say  document.write("<div>Signup Closed</div>"), removing "& Waitlist "

    Thanks!

  2. HI! Could anyone help me transform this code to a CASE-when scenario?

    <script>
    if ([@field:amount] == "0")
       {
          document.write("No Signup Yet");
        }
    else if([@field:attendees] < [@field:max_attendees])
       {
          document.write("<a href='URL?ID=[@authfield:ID]&activity=[@field:activity]&amount=[@field:amount]'>Signup Here</a>");
        }
    else if ([@field:waitlisted] < [@field:max_waitlist])
       {
          var test='Closed. <a href="URL?ID=[@authfield:ID]&activity=[@field:activity]&amount=';
          var countr = '[@field:country]';
          if ((countr !="country1")&&(countr !="country2"))
             {
                if('[@field:activity]'=="activity1")
                   {
                      test=test+'[@field:amount1]';
                   }
                else
                   {
                      if('[@field:activity]'=="activity2")
                         {
                            test=test+'[@field:amount2]';
                         }
                      else
                         {
                            test=test+'[@field:amount]';
                         }
                    }
             }
          else
             {
                test=test+'[@field:amount]';
             }
          test=test+'">Waitlist me</a>';
          document.write(test);
       }
    else
       {
          document.write("<div>Signup & Waitlist Closed</div>")
       }
    </script>
  3. On 1/18/2018 at 5:40 AM, HeezyMeezy said:

    Hello bookish,

    I see that in your desciption of the bulk edit trigger you are trying to build, you have mentioned that you are using update action for "ATTENDANCE" table but your image shows that you are updating "SCHEDULES" table and secondly Can an attendee be associated to multiple scheduled activities? If that's the case then you should have an additional join table with a many to many relationship.

    Please let me know

    hiHeezyMeezy,

    Thanks for taking time to study my case and to reply. Yes, I am updating a table ATTENDANCE where "an attendee [can] be associated to multiple scheduled activities".

    I have solved my problem with the suggestion posted by Vitaliksssss

    Thanks again. Appreciate it.

  4. Hi, I am taking advantage of the triggered action in updating a related table, and I have found greater accuracy than using the increment attendees approach (old version).

    I am just finding a challenge in relation to bulk edit.

    I have 2 tables: attendance and schedule.

    In updating table ATTENDANCE record to FINISHED status, there is an increment of 1 to the field FINISHED  (number of attendees who finished) in the SCHEDULES table. The triggered action works if I update one record. However, I have a datapage where activity in-charge use bulk editing to update several or all records to FINISHED.  The triggered action naturally adds only 1 to the number of those who FINISHED. Could you help me please to modify the triggered action formula for bulk editing?

     

    bulk edit finished not working.jpg

  5. HI! Live support is off on weekends. I have this problem I hope someone can help me. I get this error message in my site--- wp-content/plugins/caspio/classes/class-datapage-loader.php on line 4   i deleted the plugin 1.9 and uploaded the Caspio deploy plugin Version 2.0 but it still appears.

  6. HI, I had a 4MB registration database that I thought is the reason why I have huge monthly billing (data overage). It only has 2300 records and 37 fields (name, dates, yes/no, etc.) I downloaded a copy, removed some irrelevant entries (mostly texts) and uploaded them again. The file size went down to 2.9MB. Since that registration database opens every time someone registers or updates her record, I decided to just remove the ones who finished the ativity and create a separate app to search these "finished" records. However, the file size remains to be 2.9MB even if I removed 1153 records. Shouldn't the file size update automatically? I would appreciate any notes of experience if you have a similar issue. Thanks!

  7. HI! I do not know if this has any relation to the Caspio Bridge 9.0 updates, but I have now a genre of errors that a field name does not exist in a details datapage type. However, I have tried the formula and it still works (I have it for the past two years ).

     

    This is in the footer area, the datapage element combined_id is in between 2 html blocks <table style="display:none;"> and </table>

     

    <SCRIPT LANGUAGE="JavaScript">

    var str = "[@field:combined_ID]"
    var res = str.slice(0,16);
    document.getElementById("EditRecordcombined_ID").value = res;

    </script>

     

    I would appreciate any help. Thank you.

  8. Yes!! Thanks a million, Jan.

    It finally worked with a few edits. I share it below:

          var test='Closed. <a href="URL?ID=[@authfield:ID]&activity=[@field:activity]&amount=';
          var countr = '[@field:country]';

          var acttype = '[@field:activity_type]';
          var amount1 = 9999;
          var amount2 = 99999;
          if ((countr !="country1")&&(countr !="country2"))
           {
               if (acttype=="TYPENAME1") {test=test+amount1;}
                 else {test=test+amount2;}
           }
           else {test=test+'[@field:amount]';
           };
          test=test+'">Waitlist me</a>';
          document.write(test);

  9. By the way, Caspio Ninja, here is my existing code:

     

    <script>

     

    if ([@field:amount] == "0")

    {

    document.write("No Signup Yet");

    }

    else if([@field:attendees] < [@field:max_attendees])

    {

    document.write("<a href='URL?ID=[@authfield:ID]&activity=[@field:activity]&amount=[@field:amount]'>Signup Here</a>");

    }

    else if ([@field:waitlisted] < [@field:max_waitlist])

    {

    document.write("Closed. <a href='URL?ID=[@authfield:ID]&activity=[@field:activity]&amount=[@field:amount]''>Waitlist me</a>");

    }

    else

    {

    document.write("<div>Signup & Waitlist Closed</div>")

    }

    </script>

  10. Hi Caspio Ninja, that's a brilliant idea. I never thought I should change the amount from the Results Page. I am pretty sure it will work except that at the moment I have a current HTML block in the results page. I am at a lost how I could insert your additional conditions. Your code must be activated when both Signup Here and Waitlist Me are possible.

  11. Hello! My question this time is about received parameters. I have a results page from where I pass parameters to a submission form. One parameter @AMOUNT needs to be changed to AMOUNT1 if ACTIVITY 1 and AMOUNT2 for ACTIVITY2 for any one who signs up and her authentication field country is neither COUNTRY1 nor COUNTRY2. Hope I can get some help. Thanks!

     

     

  12. Happy new year! Could someone help me in this script? I am trying to edit a unique field in an update form. It allows me to edit f I select a text field. But to prevent the user from making a mistake, i enclosed the field in 2 html blocks 

    <table style="display:none;">

    </table>

     

    I place this script in the footer. It does show the right answer {(I tested using document.write(res)] and confirmation email is sent, but the unique field is not changed. 

     

    <SCRIPT LANGUAGE="JavaScript">

    var str = "[@field:combined_ID]"
    var res = str.slice(0,16);
    document.getElementById("InsertRecordcombined_ID").value = res;

    </script>

     

    Thanks in advance.

×
×
  • Create New...