Jump to content

TellMeWhy

Caspio Rockstar
  • Posts

    303
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by TellMeWhy

  1. Is this right?

    image.png.b4df9d1efc3e1b97ce2de088827018a0.png

    Here's my Formula Field
     

    CONVERT(DATE,
    
    (
    LEFT(RIGHT([@field:SKU],6),2) +'/' +
    
    LEFT(RIGHT([@field:SKU],4),2) +'/' +
    
    '20'+RIGHT([@field:SKU],2)
    
    ),101)

    RIGHT Function gets the RIGHT part of the text with specified length( RIGHT(Field, length))

    LEFT function is to get the left part of the text, once I got the 6 ending characters, I took the 2 leftmost ones to get the month, then add '/'

    Then I took the 4 RIGHT characters, and took the 2 leftmost ones again, that will be the day, then add '/'

    then '20' concatenated by the 2 rightmost digits (to get 2021)

    Then convert it all to date, 101 is code for converting text into date format and vice versa, you can omit the conversion if you don't need to.

  2. 44 minutes ago, RobStach said:

    Hi All!

    So, something has me stumped.

    Here's the scenario:  One of my tables contains a list of Events and another table contains a list of Customers who purchased tickets to those events.

    My EVENTS table contains Event location, Event SKU, and date of each event. Each location can have multipe dates.

    Customers purchase tickets to those events and a SKU is listed in the purchase (not the event date - which isn't ideal) however; the SKU has the last  6 digits as the date (example: XXX090921)

     

    Bottom line, I want the EVENT DATE (from the EVENTS table) to be entered indo the CUSTOMERS table based on the SKU that gets imported from WOO. I cannot seem to find a way to do this.

     

    Thoughts?????

    Thanks in advance!!!

     

    Rob

     

     

     

     

     

    so basically, each date (if you have multiple one based on location) has different SKU, right? Most probably, your SKU is correct, you can use Scheduled Task to transfer the dates from Events Table to Customer Table based on the SKU, Or, you can also use Formula Field.

    In your case your SKU has XXX090921, you can take the 09 then concatenate a '/' then take the next two and concatenate '/' again, then concatenate '20' to the 21, and then convert all these to Date

  3. 4 minutes ago, jpowell said:

    Hello,

    We have an app built using the GROW plan.  We have set up email notifications to be sent out when a status updates on a datapage.  Unfortunately, the email notifications are being blocked due to the strict email security settings of the company; as a result users are not receiving them.  Since the company is very large and it would be difficult for us to get the whitelisting/adding SPF and TXT records, we are trying to come up with alternative methods.

    Does any one have any ideas that are cost effective and easy to implement for sending email notifications?  Maybe use the API instead to trigger these with another source.

    Thank you

    it will be the same even if another source is used if you're using another domain to send using another one. https://support.google.com/a/answer/33786?hl=en

  4. 1 hour ago, Mikey said:

    Hello and thank you for the response.. Those posts are if you have a date field you want to extract etc. I want a triggered action to timestamp without the time included.

     

    I tried adding a field in the table to get a "current" date with a formula but cannot do that..  Not sure where to go...

     

    It's manual. You will have to get current month of TimeStamp, get current day, get current year, then concatenate everything and add the '/' another way is to create a Formula Field on the Destination table and remove the time.

  5. On 9/4/2021 at 12:22 PM, GAbbott said:

    Thanks! I did try piece by piece, and as far as that goes the red text is the part that is triggering the error. I've tried adjusting those parts in every way I can think of and nothing I've tried has worked. 

     

    Better to use parentheses when your doing calculations or concatenations of multiple fields.
    You're using one here
    image.png.8ee30afd2841f340b301d338f7a99956.png

    But not here,
    image.png.0c5f7e815e82fe9fc0e2c5b0c191b815.png

     

    Also make sure your THEN results all have the same DataType outputs, and you're not concatenatin/adding text field with a number

  6. 9 minutes ago, GrokWhy said:

    Hi,

    I'm having trouble with a map mashup.  After following the instructions, I get this message in Google Dev Tools console.

    util.js:241 Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version

    I spoke with Customer Support and they suggested I tell Google I'm wanting a later version and provided this.

    <script async     src="https://maps.googleapis.com/maps/api/js?v=quarterly         &key=YOUR_API_KEY&callback=initMap"> </script>

    Have I missed something in the setup?

    Thanks,
    Russ

     

    I get that too, but, my map works fine. The Map script is stored internally in Caspio Server, so, you probably can't do that. Maybe you can ask them to use quarterly/weekly version, but, I doubt it, cause it suddenly not work

  7. 22 hours ago, Mikey said:

    Hello, I have a drop-down field in a form that is using the user table as the lookup to assign a task. The form works as expected, but I want a way where the default item in the drop down list (the drop-down uses the user table for values) is the user who is selecting the task assignment. They can change it of course to someone else, but by default I want it to show their name from the user table..

     

    Any suggestions?

    Use the On Load feature, and on load the Authentication Field that stores their name
    image.png.5b8ac90fc314c15be471ef3b0ea2e25f.png

  8. 4 minutes ago, StephenS said:

    Hi All

    I have a results report which is using three groupings, with a large number of subsequent fields.  

    All works ok, but when I freeze the first three columns, the width seems to default to a small width and I can find no way of adjusting them.  

     

    The usual width setings and those in the style seem only to impact the columns if they are not frozen,  

    Can anyone assist in how you can set the frozen columns to a wider and fixed width

     

    thanks in advance

     

     

    What does yours look like?
    Mine adjusts accordinly...

  9. try this, basically, it's excluding the elements with the said classes using 'not'

    <SCRIPT LANGUAGE="JavaScript">
    var elems = document.querySelectorAll("td:not([class^='cbResultSetGroup1Label']):not([class^='cbResultSetTotalsData'])");
    for (var i=0, m=elems.length; i<m; i++) {
    if (elems[i].innerHTML=="1")  { elems[i].style.color="BACK";}
    if (elems[i].innerHTML=="1")  { elems[i].style.backgroundColor="LIGHTGREEN";}
    
    }
    </SCRIPT>

     

  10. 1.) This can only be done through Triggered Action. On Insert in PIs Table > Insert Container field to Container Table.

    I dont quite understand the other two, but I believe 2 is possible as long as you have a field that connects all the related records, say Product Name across all 3 tables.

    For View, what is this for? Do you want to join all records regardless of data? IF so, just use OUTER JOIN, if you want to Join them, say, based on Product Name, then use Inner Join Product Name

    Not sure if this can help you, but you can check this out 

     

  11. 11 hours ago, sadeeque said:

    For users who try to access my pages without being logged in, I have them directed to a login page using the authentication Timeout/redirection option which redirects them to their portal based on their access role. That's really simple and works fine, the problem is that I need to redirect them to the url they were trying to go to after they successfully log in. Is their away to capture their original URL before they're directed by authentication to the login datapage?

    Help Plz :)

    Are you using direct URLs or you're using webpages? I was able to do this on just DataPages, and it needs JavaScript.

    Set the Designated Entry Page on Timeout and Redirection to NONE

     

    image.png.beed90119603ef52781ee301dcb71918.png

    <script>
    
    if(window.location.href != 'URL'){
    
    window.location.href='URL';
    
    }
    
    document.getElementById('cbParamVirtual1').value = document.referrer;
    
    </script>

    Basically, on the Authentication that I use, I check if the window.location.href (the URL of the current page) is not equal to your Designated Entry Page, redirect it to your Designated Entry Page.

    the last line is putting document.referrer (The URL they got redirected from) and put it in Virtual1

     

    Virtual1 should have On Exit enabled:

    image.png.cf2ccfd2678a92e11ee2100fc2970c2c.png

     

    On your HTML DataPage, check if Virtual1 parameter is blank, if not, redirect, if it is, do some other code you want.

    image.png.19e3d9fe439b269770c5ea055a302f5c.png

    <script>
    
    if('[@Virtual1]' != ''){
    
    window.location.href='[@Virtual1]';
    
    }
    
    else{
    
    //other code you have
    
    }
    
    </script>

    You can hide fields using this or using CSS code.

  12. 11 hours ago, BRandonH said:

    So I tried the solution below but it does not display the image, I had to the the "\" operator to the field, otherwise it was displaying the caspio name for it, and as html it only displays the actual filename and location.

    <tr>
                <td rowspan="4">[@field:provider_info_ProviderPhoto\]</td>
                <td>
                <h3>[@field:provider_info_FullName]</h3>
                </td>
                <td></td>
                <td>
                <div style="color: #00bfff;"><i class="fa fa-phone"></i></div>
                </td>
                <td width="20%">[@field:provider_location_Phone]</td>
            </tr>

    this is what is have, it is displaying the other fields and icons fine,  just will not display the image.

     

    I also tried the "appkey" solution mentioned before with no, I am not sure I understood entirely what to do though. Thanks for anyones help if you are able to.

     

    -B

     

    I believe it's / not \

  13. 8 minutes ago, Dayne said:

    Where would I see if I have any redirection? The only code I have is redirecting to a certain page on a successful login.

    As soon as I embed the Login html page the error message shows up. No login form, no submit button just the message.

    You're using the iframe deployment right? Error message shows up cause you're probably logged in, try previewing the datapage and logout at the top right, then try on the embedded again. 

    What do you mean with Login HTML Page? Is it the same as HTML DataPage? HTML DataPages hold the code

  14. 6 minutes ago, Dayne said:

    I'm new to Caspio. This is my first app.

    I'm trying to build a simple login system for now by deploying my Login html data page to Sharepoint. It only accepts iFrames. The login shows up when I preview it in Caspio.

    However when I embed the deployment code it shows me a "File or directory not found." message. 

    I've gone through all the tutorials and posts I could find about it here but no luck.

    Also I'm a little unclear on how to transition to my dashboard data page afterwards on successful login. All tutorials transition to an html but I want to transition to datapages only for my app.

    Do you have redirection on your HTML datapage? what's your code there? maybe you're using relative path?

  15. On 8/29/2021 at 12:44 AM, Andrew said:

    I have an iframe where 1 datapage connects to another datapage

    The first datapage has a iframe width="100%' height="3500"

    when I am far down in the frame of the first page and click on a link to the 2nd page the 2nd page never starts at the top of the iframe window but way down in the middle/bottom

    I know this is a common issue with iframes and have reviewed multiple solutions but none of the following work.  any help is greatly appreciated

     

    none of the below works:

    onload="window.top.scrollTo(0,0);
    onload="window.parent.scrollTo(0,0);
    onload="window.parent.parent.scrollTo(0,0);

    Can you elaborate? I cant replicate yours. I have iframe on an HTML block with link to 2nd datapage, and it goes back to the top when clicked

  16. 36 minutes ago, ClayG said:

    Has anyone successfully done a live feed or a scheduled data sync from Caspio to Google Data Studio?

    I have a consultant who has created some data visualizations for us in Google Data Studio using an exported copy of data from Caspio, but now we want to try and either do a scheduled data sync or a live feed, and we're not sure where to go next.

     

    Maybe try Scheduled Export to Google Sheets, and use that for your Google Data Studio?

    Live feed may require API, and afaik, Caspio can't do that cause it's too many calls unless you buy a lot of calls...

  17. 54 minutes ago, aquintanilla said:

     

    Hi! Answering your questions:

     

    Where in the DataPage? Search Form or Details Page? - on the Details Page

    Is the checkbox an actual field or can it be a Virtual Field? - It is an actual field

    Is the checkbox ALWAYS unchecked first, with the fields editable, and once checked, all fields will be uneditable? - Yes, it is unchecked at first always with the fields editable and once checked all the fields must be undeditable


    Is the checkbox included in the uneditable fields? - Yes

    Okay, that makes it simpler then. Try this

     

    <script>
    document.getElementById("EditRecordFIELDNAME").addEventListener("change", function f1(){
    
    var myForm = document.getElementById('caspioform').querySelectorAll('input:not([type=submit]):not([type=hidden]), textarea, select'); 
      //get all fields EXCEPT with type submit, hidden, and id cbParamVirtual1, so I can still uncheck it
    
    
    
    if(document.getElementById("EditRecordFIELDNAME").checked){
    
    myForm.forEach(function elements1(elem) {
    
    elem.style.pointerEvents="none";
    
    });
    
    }//end of if
    
    
    
    });//end of event listener
    
    
    </script>

     

  18. 1 hour ago, aquintanilla said:

    Hi! 

     

    Is there a way to configure the data page in a report data page, that when the checkbox at the end is checked, then all the fields become no editable? I already tried with rules but its not working as I expected.

    Where in the DataPage? Search Form or Details Page?

    Is the checkbox an actual field or can it be a Virtual Field?

    Is the checkbox ALWAYS unchecked first, with the fields editable, and once checked, all fields will be uneditable?
    Is the checkbox included in the uneditable fields?



    This is possible, tho, we need to answer those questions first.


    I tried this on a Search Form, Virtual Field 1 > Set as Checkbox with the following script

    If checked, all fields are uneditable, if not, editable

    <script>
    document.getElementById("cbParamVirtual1").addEventListener("change", function f1(){
    
    var myForm = document.getElementById('caspioform').querySelectorAll('input:not([type=submit]):not([type=hidden]):not([id=cbParamVirtual1]), textarea, select'); 
      //get all fields EXCEPT with type submit, hidden, and id cbParamVirtual1, so I can still uncheck it
    
    
    
    if(document.getElementById("cbParamVirtual1").checked){
    
    myForm.forEach(function elements1(elem) {
    
    elem.style.pointerEvents="none";
    
    });
    
    }//end of if
    
    else{
    
    myForm.forEach(function elements2(elem) {
    
    elem.style.pointerEvents="auto";
    
    });
    
    
    }//end of else
    
    
    
    
    });//end of event listener
    
    
    </script>

     

  19. 9 hours ago, AhmeAlnaqa said:

    thanks @TellMeWhy

    for the 2 one it's solved..

     

    the hide problem .. it's not hide  !! i don't know why if u mind can u show me screenshot from the place"screen wizard" that i have to add the hide code 

     

    thanks again

    Idk, I just do this?
    image.png.57ad16c5a176a5b0aa87558d79454278.png

     

    <style>
    .cbSearchButton{
    display:none !important;
    }
    
    </style>

    Does it not work for you?

  20. 9 minutes ago, Mikey said:

    </div>
    <script>
    var isi = document.getElementById('visi[@field:MarineID]').parentNode.parentNode;
    if('[@calcfield:1#]' > -31){
    isi.querySelector('td:nth-child(8)').style.backgroundColor = '#CC6666';
    isi.querySelector('td:nth-child(8)').style.color = 'white';
    }
    else if('[@calcfield:1#]' > -61 && '[@calcfield:1#]' < -30){
    isi.querySelector('td:nth-child(8)').style.backgroundColor = '#FFFF99';
    isi.querySelector('td:nth-child(8)').style.color = 'black';
    }
    else{
    isi.querySelector('td:nth-child(8)').style.backgroundColor = 'grey';
    isi.querySelector('td:nth-child(8)').style.color = 'black';
    }
    </script>

    I tried it, and you need to remove the quotations on the calc fields, as well, not just the numbers

     

    image.png.8f79e9830cf0e40736b86fc5f5e86582.png

     

    image.thumb.png.8e674b61b0fef80f3f3c65928b12c518.png

×
×
  • Create New...