Jump to content

ChristopherNORD

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by ChristopherNORD

  1. I have a html page that references various DataPages located inside of iframes.  I would like the iframes to change in size depending on the content inside the iframe.  I can do this using the solution provided in:

    However it doesn't work with multiple iframes.  Any suggestions on how to get it to work when there are multiple iframes?

  2. On 9/12/2019 at 11:14 AM, DefinitelyNot31337 said:

    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!

    @DefinitelyNot31337

    This works great when you only have one iframe that you want to use this on.  I have 8 though and they all just use the last size that was sent to the console.  How can I use this for multiple iframes?

  3. On 8/5/2020 at 9:43 AM, CoopperBackpack said:

    Hello @ChristopherNORD,

    As an option, you may apply your custom styles to the th tag to change the view of the table headers.

    Just add the code at the top of in the message body and render Email as HTML.

    
    <style>
    th {
     //your custom values for the CSS properties
    }
    </style>

    Screenshot for visualization:

     lkXVupT.png

    In order not to display "Expression1", please replace the Table Variable with the Variable to store the count. 

    In this case, you will receive the count as an integer instead of the table with the title "Expression1" and value below it.

    Hope this helps.

     

    Both of those worked.  Thank you!  Now need to figure out how to change the table header values.

  4. 3 hours ago, Vitalikssssss said:

    Hi @ChristopherNORD,

    Perhaps it would be a good idea to add a checkbox field to table to distinguish when field Date_Added can be editable  (e.g.  Editable: Yes/No).

    You may add an additional condition in WHERE clause to filter-out records that has "Editable" field set to "No" (unchecked).

    Hope this helps.

    Regards,

    Vitalikssssss

    This is a good idea but I can't get any fields to show up.

    image.thumb.png.ad68d9c4566a21d71597e393cb368a78.png

    I'm guessing it's because of the inner join?

    image.png.5098391ab9f912ec81e4076cc44267a8.png

     

  5. On 8/3/2020 at 5:15 AM, astroboy said:

    Hello @ChristopherNORD,

    I'm not sure if you have considered this already, but did you know that you can modify the timestamp field to also run On Update and not only On Insert? If not, you may want to give this a try and see if that can help achieve this workflow. You can configure your timestamp field by going to your table design and then select the field and check the 'Stamp On Update' checkbox from the right panel of the screen. You may check this screenshot for reference:

    image.thumb.png.ab40cb5c31d9b4f1cf43e925b9b31e46.png

    I hope this helps.

    Cheers!

    Note that my timestamps are conditional on what another field says.  I don't want a timestamp every time something is updated only when something is updated and a field says something specific.

  6. I'm using Tasks to generate an automated email that shows data from a table based on various parameters. image.png.74421a026771d64a8194fdb31df18da8.png

    Message HTML:

    <h1><span style="color:#0000ff;">Engineering Open Jobs Report</span></h1>
    <h2><span style="color:#0000ff;">Jobs in Progress ([@variable:InProgressCount]</span></h2>
    [@variable:JobsInProgress]

    When the task runs, I get:

    Engineering Open Jobs Report

    Jobs in Progress (

    Expression1

    9

     

    Job_ID

    Request_Type

    Submit_Date

    Submitted_By

    Cust_PO

    Account_Text

    Model_Number

    Processed_By

    Workflow_Number

    Status

    54889

    Drawing (Proposal)

    7/8/2020 2:58:57 PM

    JFK

    dafasdfasdfa

    AccountTextHere

    100

    someone

     

    In Progress

     

    I want to be able to modify the header labels or hide them and use HTML to label the cells.  I'd also like the value of "Expression1" to not be in a table and be formatted per the HTML code.

     

    Any suggestions?

     

  7. When a DataPage report is updated and there is a change in status (a drop down) I want to record the time in my table.  I use triggered actions to make this happen.  Below is an example.  The issue is that sometimes I need to manually enter a timestamp into my table but the triggered actions won't let me.  The workaround is to import the data to populate the field but I'd rather do it from a DataPage.  Any ideas?

     

    image.png.f4b264502b042553409195af8d0904b7.png

×
×
  • Create New...