![](http://content.invisioncic.com/r269793/set_resources_11/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Wikiwi
Caspio Guru-
Posts
116 -
Joined
-
Last visited
-
Days Won
12
Wikiwi last won the day on December 6 2023
Wikiwi had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Wikiwi's Achievements
-
-
I found a bug in document generation's custom value feature. In their how-to documentation it says that you can use data source fields as parameters in custom value mapping type. I tried copying the example provided in the how-to link: (https://howto.caspio.com/document-generation/mapping-templates/mapping-one-template-field-with-many-table-fields-through-parameters/#:~:text=Steps to map a template field with many table fields%3A) But I got the following result on my end: Instead of acting as a parameter, the custom value treats the parameters as actual text 😂😂😂. Things I tried so far that didn't work: - encapsulating both parameters in single or double quotes - Used table as a datasource instead of view. Note: I know I can make a formula field in my table and combine these 2 fields then use that formula field for mapping but what if I'm using a View and I need to map a textbox with 2 fields from different tables?
-
I have this table that has 2 date fields (rent_date and return_date). I want to plot both of these dates in a monthly calendar datapage. ex. ID = 1 rent_date = May 2, 2024 return_date = May 5, 2024, Is this possible without creating a new table that separates the dates to 2 records (this solution is a hassle to create and maintain)?
-
kpcollier reacted to a question: [FYI] How to separate comma delimited input and insert it all in one column
-
roattw reacted to a post in a topic: [FYI] Removing HTML tags to data inputs using RICH text editor using JavaScript
-
vidierre reacted to a question: [FYI] Item picker for characters with diacritical marks
-
Tubby reacted to a question: [FYI] How Conditions(CASE WHEN) is validated
-
researched reacted to an answer to a question: Wordpress Login Deployment Fail
-
Pumpedplop reacted to a question: [FYI] How Conditions(CASE WHEN) is validated
-
jbemerge reacted to a post in a topic: [FYI] Pop up on first login
-
roattw reacted to a post in a topic: Script to select checkbox based on dropdown does not trigger checkbox rule
-
autonumber reacted to a post in a topic: [FYI] Custom Icon inside textbox
-
@Billp of course, Js is another solution for this, if you're fairly adept ins JS I found this small piece of script in StackOverflow that might fit your requirements. You still need some kind of identifier for your users location though https://stackoverflow.com/questions/10087819/convert-date-to-another-timezone-in-javascript
-
-
Instead of combining the the standard feature Rules and your script that is causing an issue. why not do all the logic within the script? <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { const selectElement = document.querySelector('#InsertRecordRole'); const Gradyear= document.querySelector('#InsertRecordGraduation_field'); //this is to get your graduation year field. Gradyear.style.display= "none"; //by default this field is hidden selectElement.addEventListener('change', (event) => { if(selectElement.value == "Resident"){ document.querySelector("#InsertRecordAlumni").checked = true; Gradyear.style.display= "block"; //if dropdown is Resident, alumni checkbox is checked and that also means graduation year should be visible. }else{ document.querySelector("#InsertRecordAlumni").checked = false; Gradyear.style.display= "none"; // incase a user changed the selectElement.value to another option } }); }); </script>
-
If you are sending the invite via email. I would create a task or trigger that will check your recipients location (maybe a field in your table) and create a logic that will add or minus the difference in hour to your UTC date before sending the invite. For example. Lets say once of the recipients location is New York, the Task will check this location first and then minus 4 hours to your UTC date.
-
To add an icon that represents what you would like your user to put in a specific field, you can do the following: Download image files that you would like to use as icons. Create a FILE app parameter using the image that you downloaded. Add a Header and Footer in your Datapage and disable the HTML editor. In your Header, paste the following CSS script: #InsertRecordFIELDNAME { padding-right: 33px; background-image: url(PUT_YOUR_APP_PARAMETER_HERE); background-position: 97% ; background-repeat: no-repeat; background-size: 20px; } Output: Take note that the code above will put the icon on the right side of your text field. If you want it on the left, you can use the below CSS instead: #InsertRecordFIELDNAME { padding-left: 33px; background-image: url(PUT_YOUR_APP_PARAMETER_HERE); background-position: 3% ; background-repeat: no-repeat; background-size: 20px; } Output: Replace FIELDNAME with your own field name and do the same thing with the App parameter. Also, the code above is used in a submission form, if you are using an update form you may need to change #InsertRecord to #EditRecord.
-
This custom solution will allow you to change the content of an HTML element depending on your device.You just need to create an HTML BLOCK or use a HEADER and FOOTER and disable the HTML editor. Take note that this is not the actual use of a Psuedo-Element ("::before"). This is just an experiment that I tried on my App.Put the following script: <style> p#test::before { content: "This message is for the Desktop viewer"; /*You can change this part to show your own message for Desktop view*/ } @media (max-width: 640px) { p#test::before { content: "This message is for the Mobile viewer"; /*You can change this part to show your own message for Mobile view*/ } } } </style> <p id="test"></p> /*This will be the container of your messages*/
-
KG360 reacted to an answer to a question: Add Characters in the beginning of the value
-
You can create a triggered action that will send a notification to your user if it detects that the inserted record's "Task Frequency Hourly" field has value in it. You can then add more action to this trigger like the 3rd item on your list. For more information about triggered action you can check this handy article: https://howto.caspio.com/tables-and-views/triggered-actions/
-
Add Characters in the beginning of the value
Wikiwi replied to KAPITYAN's question in Calculations and aggregations
If you want to use a triggered action you can create a setup just like below: Trigger setup: Output: -
Trigger to split the date with date range
Wikiwi replied to Harpreet's question in General Questions
You can achieve this using a small triggered action and a dummy table that will accept the input from your DataPage and will contain the trigger that will create all the records of date range. Trigger in the dummy table: Sample input in dummy table: Output to main table: -
This use case will have the following parts:- Landing DataPage. This is the homepage that your user will go to once they log in.- Yes/No field in the User table. This will serve as a marker if a user logged in.- Single Record Update DataPage that will serve as the Pop-up window.- A new Localizationthat will be used in the Single Record Update DataPage.Configuring the POP_UP DataPage- Create a new Single Record Update DataPage and change its DataSource to your Users table.- Configure "Record Identification" by picking the the unique ID in your Users table.- Add the Yes/No field to your webform.- Create an HTML BLOCK that will serve as your pop up message.- Configure your Yes/No field to be "hidden" and check "On load, receive: yes".- Add a Header and Footer in your DataPage.- In the footer, disable HTML editor and put the following script: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { window.top.location.reload(); }); </script> Edit your Landing DataPage- Once you have configured your basic Authentication and the pop up DataPage. Add the following code in the header and footer of your Actual DataPage.Header: <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 5%; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } /* Modal Content */ .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 60%; height: 70%; } /* The Close Button */ .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; } </style> Footer: <div id="myModal" class="modal"> <div class="modal-content"> <iframe name="Acknowledgement_Letter" title="Acknowledgement_Letter" src="<PUT_YOUR_POP_UP_DATAPAGE_URL_HERE>" frameborder="0" style="width: 100%; height: 100%;">Sorry, but your browser does not support frames.</iframe> </div> </div> <script> // Get the modal var modal = document.getElementById("myModal"); document.addEventListener('DataPageReady', function (event) { if('[@field:firstlogin_checker]' == 'No'){ modal.style.display = "block"; } }); </script> - In the footer, change <PUT_YOUR_POP_UP_DATAPAGE_URL_HERE> with the deploy code of your pop-up Datapage. Dont forget to add the parameter for your unique ID.For example: [DATAPAGE_URL]?email=[@authfield:email] Localization of the pop-up DataPage:- Create a new Localization.- Under Forms/Details Pages>Buttons. Click the "Update" row.- Under the Custom text, change the current value to "I accept" or any acknowledgement statement.- Hit save and apply this localization to your pop-up DataPage.
-
The scripts below will let you have a different button style when a Datapage is opened on a mobile device. Technically you will have 2 different buttons with the same action/use, 1 for the mobile view and 1 for the desktop view.First, create a header and footer field, disable the HTML editor, and put the following STYLE in the header <style> input[name="MobileButton"]{ display: none !important; } /*this line will hide the mobile*/ button by default input[name="searchID"]{ display: none !important;} /* this will hide the actual button that*/ comes with the DataPage. @media (max-width: 640px) { /*this part will detect the width of the screen*/ input[name="MobileButton"] { display: block !important;} input[name="PCButton"] { display: none !important;} } </style> Once that is done, create an HTML BLOCK, disable the HTML editor and paste the following code: <input type="submit" name= "PCButton" class="cbSearchButton" value="THIS IS THE DESKTOP BUTTON"> <input type="submit" name="MobileButton" class="cbSearchButton" value="THIS THE MOBILE BUTTON" > NOTE: you can also put the above code in the footer. It just depends on the look that you want to achieve. I also changed the value for the 2 button so you can see them change when changing screensize.
-
Convert a datediff to dd:hh:mm
Wikiwi replied to KAPITYAN's question in Calculations and aggregations
@Leon13 Not sure why you are getting 32 for the day part. I tried the values you used for testing and it shows me 30. I also edited hours part for the formula since that part is incorrect. Code I used: CONVERT(VARCHAR,(Datediff(day,[@field:Submission_Date],[@field:Time_to_Resolve])))+':'+ CASE WHEN (Datediff(hour,[@field:Submission_Date],[@field:Time_to_Resolve]) % (24*Datediff(day,[@field:Submission_Date],[@field:Time_to_Resolve]))) < 10 THEN '0'+ CONVERT(VARCHAR,Datediff(hour,[@field:Submission_Date],[@field:Time_to_Resolve])%(24*Datediff(day,[@field:Submission_Date],[@field:Time_to_Resolve]))) ELSE CONVERT(VARCHAR,Datediff(hour,[@field:Submission_Date],[@field:Time_to_Resolve])%(24*Datediff(day,[@field:Submission_Date],[@field:Time_to_Resolve]))) END Screenshot of my DataPage: