Jump to content

Vitalikssssss

Caspio Rockstar
  • Content Count

    494
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by Vitalikssssss


  1. Hi @ababcock,

    I think the issue caused by the invalid way how you try to reference the Update button.

    document.getElementById('Mod0EditRecord').onmouseover = ...

    Caspio has recently introduced some changes in the way how ID of the element is generated.

    Unique postfix has been added to each element of a Datapage.

    jglYwu2.png

    You can use CSS selectors to get the element by partial name e.g. 

    document.querySelector("input[id^='Mod0EditRecord']")

    or by using class to refer to the Update button e.g.

    document.getElementsByClassName('cbUpdateButton')[0];

    Hope this helps.

    Regards,

    vitalikssssss


  2. Hi @DruidCtba,

    In regards to your questions:

    1. Datapage and columns width adjusted automatically in order to fill out the container where it is embedded and to fit content of columns.

    You can define the width of the columns as explained in this article: https://howto.caspio.com/datapages/datapage-components/field-configuration-options/field-and-column-width/

    Quite often this setting gets overwritten if Datapage do not fit the container. You can define width of the Datapage (container) as explained in this article:

    https://howto.caspio.com/styles/fix-the-width-of-the-datapage/

    2. It is possible to have separate colors for Odd and Even rows. You can change the color of Even rows in the following settings in Caspio Styles:

    2G3oWeB.png

     

    3. It is possible to change the layout of fields. There is a checkbox field in "Advanced"which allows you to place fields in the same line and also change the position of labels.

    You can check this article for more information:

    https://howto.caspio.com/styles/put-multiple-fields-on-one-line/ 

    Hope this helps.

    Regards,

    vitalikssssss

     

     


  3. Hi @vanderLeest,

    Please make sure that you use the expression in Formula field, since Calculated field/Calculated value do not support HTML output.

    Also, you need to tweak your expression because concatenation with "+" available only for string type.
    Also both logic block should return same datatype. 

    CASE
    WHEN [@field:MS_InvAmount] > [@field:MS_Budget] 
    THEN '<span style="color:#ffff00;">'+CAST([@field:MS_InvAmount] AS nvarchar)+'</span>'
    ELSE CAST([@field:MS_InvAmount] as nvarchar)
    END

    Hope this helps.

    Regards,

    vitalikssssss


  4. Hi @mgredmond,

    You can add your actual field into submission form and use Calculated value form element to reference the result of Virtual field.

    Advanced Calculated value settings allows you to hide field.

    VblTLAw.png

    The formula expression will need to have a CASE logic block because Calculated value works with "Value" section of dropdown.

    It might look like this:

    jwjr1Wo.png

    Hope it helps.

    Regards,

    Vitalikssssss


  5. Hi @Tonie,

    There is not need to specify the character which you would like to encoded in the code.

    I assumed that you have a Tabular Report Datapage and created a code based on the link you have provided:

    <a href="#" id="link-[@cbRecordIndex#]">[@calcfield:1#]</a>
    
    <script>
    // DO NOT TOUCH FROM THIS POINT
    var params = []; 
    addParameter = function(qs, val){
      params.push(`${qs}=${encodeURIComponent(val)}`);
    }
    //UP TO THIS POINT
    
    var link_id = "link-[@cbRecordIndex#]";
    var base_url = "[@app:URL_2]";
    
    addParameter('cid', '[@field:ID]');
    addParameter('fn', '[@field:FirstName]');
    addParameter('ln', '[@field:LastName]');
    addParameter('a1', '[@field:Address1]');
    addParameter('a2', '[@field:Address2]');
    addParameter('c', '[@field:City]');
    addParameter('z', '[@field:ZipPostalCode]');
    addParameter('p1', '[@field:PrimaryPhone]');
    addParameter('p2', '[@field:SecondaryPhone]');
    addParameter('da1', '[@field:Address1]');
    addParameter('da2', '[@field:Address2]');
    addParameter('dc', '[@field:City]');
    addParameter('dz', '[@field:ZipPostalCode]');
    addParameter('dp1', '[@field:PrimaryPhone]');
    addParameter('dp2', '[@field:SecondaryPhone]');
    addParameter('r', '[@field:Route]');
    addParameter('dn', '[@field:DriverNote]');
    addParameter('pa', '[@field:PhysicalAssistanceComment]');
    addParameter('rc', '[@field:Rate_Cd]');
    addParameter('m', '[@field:MobilityDevice]');
    addParameter('cbResetParam', '1');
    
      
    // DO NOT TOUCH FROM THIS POINT
    var queryString = params.join("&");
    document.querySelector(`#${link_id}`).href = `${base_url}?${params.join("&")}`
    //UP TO THIS POINT
    
    
    </script>

    Regards,

    Vitalikssssss

     


  6. Hi @CMorris,

    Values from virtual fields do not have a datatype.

    You would need to wrap the fields reference with single quotes to make them string type and convert the string to float type.

    You can use T-SQL function CAST or CONVERT for this.

    So, your expression will look like this:

    CASE
    
    WHEN '[@cbParamVirtual2]' = 'mm' THEN CAST('[@cbParamVirtual1]' AS FLOAT)/25.4
    
    ELSE CAST('[@cbParamVirtual1]' AS FLOAT)
    
    END

    Regards,

    vitalikssssss


  7. Hi @rjvelarde,

    I think the easiest way to achieve is by using Formula field in the table with CASE expression.

    e.g. 

    CASE
    
    WHEN [@YOUR_FIELD] = 'Follow up' THEN '<span style="color:#ffff00;">'+[@YOUR_FIELD]+'</span>'
    
    WHEN [@YOUR_FIELD] = 'Irrigation System' THEN '<span style="color:#0066ff;">'+[@YOUR_FIELD]+'</span>'
    
    WHEN [@YOUR_FIELD] = 'New Well' THEN '<span style="color:#009933;">'+[@YOUR_FIELD]+'</span>'
    
    ELSE 'Not defined'
    
    END 

    Finally, you can render the content of the formula output as HTML if you enable the HTML option in Formatting field settings:

    Field_formatting_options_4.png

    Hope this helps.

    Regards,

    Vitalikssssss

     

     


  8. 23 hours ago, ryancys said:

    By the way, now I'm able to link the Submission Form to the Data Page, but the fact that I cannot select the "Calculated Field" from the "Filtering Field", how can I pass the Submission Form's parameter to it?

     

    tmp.jpg

    It looks like you have selected a Search from instead of Predefined parameters as explained in the video tutorial.
    You will find the detailed answer in the video tutorial I have sent you above.

    Regards,

    vitalikssssss


  9. On 2/20/2020 at 12:13 PM, ryancys said:

    Hi @Vitalikssssss

    >> You may use Virtual fields for this Submission Form. Virtual fields can pass parameters to the report to filter the data.
    Ok, I got it. I was able to pass the value from a Submission Form to my existing Data Page now.

    >>Also, you would need to embed both Submission Form and Report on single web-page.
    Can you show me how to do this?

    Tks again.

    Regards,
    Ryan

     

     

    Hello @ryancys,

    You may check the following tutorial video for more information related to the deployment of two Datapages in one web-page:

     


  10. Hi @ryancys,

    You would need to use separate from the the search which will be based on Submission Form.

    You may use Virtual fields for this Submission Form. Virtual fields can pass parameters to the report to filter the data.

    Also, you would need to embed both Submission Form and Report on single web-page.

    The concept described in this article: https://howto.caspio.com/tech-tips-and-articles/tech-parameters/add-a-search-interface-to-results-sets-page/

    Calculated Value datatype is available on Submission Form and Single Record Update Form. 

    Hope this helps.

    Regards,

    vitalikssssss

×
×
  • Create New...