Jump to content

MayMusic

Caspio Evangelist
  • Content Count

    1,510
  • Joined

  • Last visited

  • Days Won

    73

Reputation Activity

  1. Like
    MayMusic got a reaction from TWIRED in Questions A Bundled   
    1) How Can I Change the Default "View Details" link to just "Details"?
     A: Edit the localization you are using for this page, under Results Pages >> Record Actions >> Element find view details and change the custom text
     
    2) Grid Edit - How Can I Make the tables NOT shrink and get squishy when I Click "Grid Edit" :
    A: Add Header to "Configure Result Page Fields" screen and use the code below:

    <style>
    .cbGridCtnr, .BodyCtnr, .Table {
    width: 100% !important;
    }
    </style>
  2. Like
    MayMusic got a reaction from TWIRED in Can I Import From Excel File Through Datapage   
    If you want them to feed the table without having access to Caspio you can request for datahub which is a scheduled import/export task. User can put the file somewhere like a FTP site and Caspio can be programed to run for instance every hour to import the data. Using this feature you can either replace the table or append the data to the table
     
    If you want to let them update certain records then you can try web services http://www.caspio.com/extend/platform-extensions/web-services.aspx if you know programming.
  3. Like
    MayMusic got a reaction from NealPatil in Intractable Problem In Views   
    You need to have a third table which keeps VID and CID and there has to be another field (CombinedVCID) to keep the combination of these two. Since there can be only one matching this field should be unique.
     
    Then in your report include CombinedVCID and filter your report with this field to find Does not Contain and receive VID from authentication.
  4. Like
    MayMusic reacted to ezIQchad in Conditional Formatting Trick   
    Check out this trick I stumbled upon.
     
    Put Caspio Variables into your Classes so you can use CSS to dynamically style your pages.
    (js not required)
     
     
    Div to dynamically format 
    <div class="action[@field:action]"></div> css
    .actionCall { background-image: URL("../img/call.png"); } .actionEmail { background-image: URL("../img/email.png"); } .actionText { background-image: URL("../img/text.png"); } Dynamic Elements - load all options, and hide all but needed
    <a class="btnFile fileName[@field:FileName]" href="../some/dir/[@field:FileName]">Download</a> <a class="btnLink fileLink[@field:FileLink]" href="[@field:FileLink]">View File</a> css
    /*-- when [@field:***] is null, hide the div --*/ .fileName, .fileLink { display: none; } Hope this helps
     
    Think Easy
    CHAD
    -I know the Title of this Forum is "Ask....", but IDK where else to share stuff like this.
  5. Like
    MayMusic got a reaction from TWIRED in Page redirecting to another page inside the embedded frame   
    Sure you can get iframe deploy code and add it to the footer of submission page (search page). Along with the source URL of the frame you need to pass all parameters to the frame:
     
    <iframe name="Web_Order" title="Web_Order" src="https://b15.caspio.com/dp.asp?AppKey=c82222022027df1c5e22223e1&id=[@id]&Name=[@Name]&email=[@email]">Sorry, but your browser does not support frames.</iframe>
  6. Like
    MayMusic got a reaction from satch in Calculate field in Datapage, getElementByClassname   
    https://developer.chrome.com/devtools
    http://getfirebug.com/
  7. Like
    MayMusic got a reaction from ray in Show icon based on time difference   
    Lets say you have two date fields called Date1 and Date2 also a unique field for each row called Id
     
    <div id="show[@field:Id]"></div> <script> var d1 = new Date('[@field:Date1]'); var d2= new Date('[@field:Date2]'); var hourDiff =d2 - d1; var minDiff = hourDiff / 60 / 1000; if (minDiff < 30){ document.getElementById('show[@field:Id]').innerHTML = '<img src="http://someapp.com/nk/icons/greenstar.png" width="100px"/>'; } else if (30<minDiff && minDiff <120 ){ document.getElementById('show[@field:Id]').innerHTML ='<img src="http://someapp.com/nk/icons/redstar.jpe" width="100px"/>'; }else if (minDiff >120){ document.getElementById('show[@field:Id]').innerHTML ='<img src="http://someapp.com/nk/icons/yellowstar.jpe" width="100px"/>'; } </script>  
  8. Like
    MayMusic got a reaction from telepet in Auto-populate a blank column in a newly imported table with an App parameter   
    This is not possible in Caspio platform, unless you write a trigger to add the value once there is a new entry to the table. It is easier if you do it in Excel and them import the complete sheet to Caspio
  9. Like
    MayMusic got a reaction from LyaP in Select Multiple Values from Listbox in Update (Multiple Listboxes)   
    Try this
     
    <script type="text/javascript"> var mylist= new Array ("EditRecordStatus","EditRecordMarket_Sector","EditRecordDivisions") ; var v_state = new Array ("[@field:Status]","[@field:Market_Sector]","[@field:Divisions]") ; for (var k=0; k<mylist.length; k++){ var m = document.getElementById(mylist[k]) ; var o_state = document.getElementById(mylist[k]); m.multiple = true ; f_listbox(); function f_listbox() { if ( v_state[k].indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state[k]) { o_state.remove(i); break ; } } var o_st = v_state[k].split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } } </script>  
  10. Like
    MayMusic got a reaction from aam82 in Disable Submit Button if checkbox value is "Yes"   
    You can have this code in Footer of your update page:
     
    <script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script><script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script>
    <script> if (document.getElementById('EditRecordCHECKBOXFIELDNAME').checked){ document.getElementById('Mod0EditRecord').style.display="none"; } </script>  
    Replace CHECKBOXFIELDNAME with the actual field name
  11. Like
    MayMusic got a reaction from telepet in Does View update itself if source Table design is changed?   
    Each time you open a view or call a view via DataPage, view is making a call to table to filter the data. Therefore the data is being generated on each call so data is updated. But as for the design as it is mentioned above newly added fields should be available in the wizard but they need to be included (by default they are not included in view).
    You also have the option to change the name of the fields in the view to make them shorter. By default you have TableName_FieldName if you change table name part and leave "_" by moving to next field system will ask you if you want to have the same naming for other fields as well to change them all at once
  12. Like
    MayMusic got a reaction from JEllington in Cascading dropdown from non-editable parent field?   
    If you want to show the parent value you can add HTML Block or virtual field and select the field there
  13. Thanks
    MayMusic got a reaction from vanderLeest in Combine 2 fields into 3rd on Inline Insert   
    I tried this code and it worked for me
    <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var CompanyID = document.getElementsByName("InlineAddRed")[0].value; var Area = document.getElementsByName("InlineAddGreen")[0].value; var CompanyID_Area = CompanyID + Area; alert(CompanyID_Area ); document.getElementsByName("InlineAddallcolor")[0].value = CompanyID_Area; } document.getElementById("Mod0InlineAdd").onclick=concatenate; </SCRIPT>  
  14. Like
    MayMusic got a reaction from JEllington in Some Parameters Doesn't Show and Also show older data?   
    HAHA you were expecting me to reply You also know I am always online  Thanks for updating the post
     
  15. Like
    MayMusic got a reaction from telepet in Reset button on Search Form does not work as needed   
    Button code would be
    <input type="button" onclick="window.location='[URL_for_my_search_page]'" value="Reset Search"/>  
  16. Like
    MayMusic got a reaction from Eduardo in Button for adding fields   
    You should include all in your page and then based on user selection hide the ones that are not selected, There has to be a virtual dropdown where they select how many areas they want, and then add rules: so if value is greater than 4 hide 5, greater than 3 hide 4, greater than 2 hide 3 ....
     
    http://howto.caspio.com/datapages/forms/conditional-forms/
    try this and see how it works !
  17. Like
    MayMusic got a reaction from telepet in Reset button on Search Form does not work as needed   
    Here is the code to create custom search again
    <a class="cbResultSetSearchAgainLink" href="URL"><img alt="Search again" src="https://c0cmr140.caspio.com/images/dp/SA_magnifier.png" style="vertical-align: text-bottom; border: 0px;" title="Search again" /> Search again</a>  
  18. Like
    MayMusic got a reaction from peterhanse in parameter (date) from searchpage to result page   
    Thanks for sharing
  19. Like
    MayMusic got a reaction from telepet in using a dropdown with the Inline edit in Search Report?   
    In inline edit you have option to choose form element as well, click on Editing tab and change it.
  20. Like
    MayMusic reacted to kRv in Reload Main Page   
    Hello Farnsbarnes,
    Can you tell me please, do you use different domains for parent page, and for iframe? If yes, proposed solution cannot works due to security restrictions. Can you please open browser console, and look for some run-time errors, when you submit form in iframe? Can you see some error with similar text? "SecurityError: Blocked a frame with origin..." 
    If you have similar error, you can use some different technique based on messages. Please pay your attention that it will works in modern browsers only. You can see list of supported browsers here http://caniuse.com/#search=postMessage  
     
    Add code below to header on your parent page:
    window.onmessage = function (e) { if (e.data === "refresh") { location.reload(); } }; Add code below to footer in your DataPage, which will open via iframe.
    <script type="text/javascript"> document.getElementById("caspioform").onsubmit = function () { if (window.parent && window.parent.postMessage) { window.parent.postMessage("refresh", "http://bridge.caspio.net"); //put your own domain here } } </script> Thanks
  21. Like
    MayMusic got a reaction from NaghmehK in Checkbox on Submit if statement   
    You can have the code below:

     
    <script> document.getElementById("Submit").onmouseover = function(){ if (document.getElementById('Dropdown ID').value == "National"){ document.getElementById('InsertRecordYesNo').checked = true; }else{ document.getElementById('InsertRecordYesNo').checked = false; } } </script>  
     
    InsertRecordYesNo  is the ID of checkbox and Dropdown ID is the ID of dropdown. This function will fire when you hoverover Submit button,
  22. Like
    MayMusic got a reaction from ArdmxurEn in Add days   
    If you want t0 add to a date which is being selected on the page then use
    <script> function f_date(){ var v_currentDate=new Date(document.getElementById('InsertRecordDATEFIELDNAME').value); v_currentDate.setDate(v_currentDate.getDate() +10); var v_assignDate = (v_currentDate.getMonth() + 1) + "/" + v_currentDate.getDate() + "/" + (v_currentDate.getFullYear()); alert(v_assignDate); document.getElementById('InsertRecordNAME OF THE FIELD WHERE YOU WANT TO SAVE THIS DATE IN').value = v_assignDate; } document.getElementById('InsertRecordDATEFIELDNAME').onchange=f_date; </script>
  23. Like
    MayMusic got a reaction from aam82 in Expiration Field Update   
    <script> function f_date(){ var expireDate=document.getElementById('EditRecordDATEFIELDNAME').value; var v_assignDate = (expireDate.getMonth() + 1) + "/" + expireDate.getDate() + "/" + (expireDate.getFullYear()+1); document.getElementById('EditRecordDATEFIELDNAME').value = v_assignDate; } f_date(); </script> try the code above in the Footer of your update page. "EditRecordDATEFIELDNAME" needs to be replaced with ID of date field.
  24. Like
    MayMusic got a reaction from MarkD in Maps And Search Results - How To Display Different Numbers Or Results   
    You need to have another report page which is pulling all the results and create your map of off that. Hide the report and only show the map. Then deploy both report pages on one web page.
  25. Like
    MayMusic got a reaction from JEllington in Passing Parameters From A Report   
    When you have a many to many relationship you need to create a join table to break it to two one to many relation.
×
×
  • Create New...