-
Posts
635 -
Joined
-
Last visited
-
Days Won
35
Everything posted by Jan
-
Hello Swipebox, As far as I know, you can block weekdays with the following script: <script type="text/javascript"> function f_enableSingleDOW(v_dayNumber) { var v_calendarObj = document.getElementById('cbCalendarBody'); if(!v_calendarObj) return; var v_rowObjs = v_calendarObj.getElementsByTagName('tr'); for(var i = 0; i < v_rowObjs.length; i++){ var v_dayObjs = v_rowObjs[i].getElementsByTagName('td'); for(var j = 0; j < v_dayObjs.length; j++){ if(v_dayNumber == j) continue; try{v_dayObjs[j].onclick = v_dayObjs[j].onmouseover = v_dayObjs[j].onmouseout = null;}catch(v_ex){} try{v_dayObjs[j].childNodes[0].href = 'javascript:void(0)'; }catch(v_ex){} } } } function f_addEventListener(v_elem, v_event, v_fn) { if (v_elem.addEventListener) { return v_elem.addEventListener(v_event, v_fn, false); } if (v_elem.attachEvent) { return v_elem.attachEvent('on' + v_event, v_fn); } } var v_calendarCtnrs = document.getElementsByClassName("cbFormCalendar"); for(var v_i = 0; v_i < v_calendarCtnrs.length; v_i++){ f_addEventListener(v_calendarCtnrs[v_i].childNodes[0], 'click', function(){f_enableSingleDOW(0)}); } </script> Please insert it in the Footer and enter your weekday instead of 0 in the f_enableSingleDOW(0) at the end of the script. The first day is 0, the second is 1 and so on. If I understand correctly, you can add your Date Picker to an HTML block, and then pass the selected value to the field of the page.
-
Hello EIQ, Please, try Datediff(minute,[@field:LoginDT],[@field:LogoutDT])/60.00 As far as I know, Calculated Fields try to display result in the DataType that are used in calculations. For example, you divide by "60" - and the Result is Integer. If I understand correctly, if you divide by "60.00" - Result will be General, like 0.25. By the Formatting button you can define how many digits after decimal will be displayed.
- 3 replies
-
- calculated field
- date
-
(and 3 more)
Tagged with:
-
Hi feliciacaspio, If I understand correctly, you create a DataPage, assign it with an Authentication and add a RLS by any field, and then assign the DataPage with another Authentication? I tried and the Finish button was disabled until I approved changes on the Single Record Update step. Probably I miss some steps or did wrong steps. Could you please provide some more details?
- 1 reply
-
- authentication
- no record found
-
(and 3 more)
Tagged with:
-
Hello Matthew, As far as I know, you can pass results of calculation as parameters and use an auto-submit DataPage to save them in another table. I am not sure about pulling data with Java. Maybe it is possible to use a standard table?
-
Match Geolocation Coordinates To User's Location
Jan replied to juancoffee's topic in User JavaScript and CSS Discussions
Hi Duncan, It seems I have found a solution. I am not sure that it is the best way. A user enters his coordinates on a Reports DataPage. On Results page the tables is hidden, the Java Script checks whether message "No records found" is displayed. If yes, error message is displayed and the Search form is displayed again. Else a user is redirected to a Submission form, where he/she enters a data. Please try next steps: 1) Create a Reports DataPage, add the Distance Search By Coordinates on the Select Search Fields step. 2) On the next step, select the Distance field, select the Hidden in the Form element drop down box and enter your Default Value. 3) On the Configure Results Page Fields, add the following code to the Header: <div align="center"> <p>Processing...</p></div> 4) On the Configure Results Page Fields, add the following code to the Footer: <script type="text/javascript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; var place_is_found = 1; var elems = document.getElementsByTagName("p"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML== "No records found. Please, enter more short query.") { place_is_found = 0; } } if (place_is_found==1) { window.location = "http://www.caspio.com/"; } else { alert("Warning message"); window.history.back(); } } </script> Please enter the address of your DataPage instead of "http://www.caspio.com/". Also enter your message instead of "Warning message". I hope it helps.- 5 replies
-
- geolocation
- coordinates
-
(and 5 more)
Tagged with:
-
Hello EIQ, I tried Value2_1 (my field is the second in the first section) and the script works. It works rather slowly, but it works the same on the Submission form. Could you give the URL to your DataPage? By the way, there is the article about names of variables.
- 7 replies
-
- js
- JS: Format Phone Number
-
(and 1 more)
Tagged with:
-
Hi Liz, caps is not a problem, problem might be if capitalization of the name of the field and the name of the variable are different. I have read your code, maybe, the problem in the paragraph before "Today". In your code: if (sDate<nDate) { alert("Start Date should be more than Today"); return false; } Try to put "Today" on the one line: if (sDate<nDate) { alert("Start Date should be more than Today"); return false; } I hope it helps.
-
Hello Liz, Maybe, the capitalization is the problem. Is the name of your field "START_DATE" or "start_date"?
-
Match Geolocation Coordinates To User's Location
Jan replied to juancoffee's topic in User JavaScript and CSS Discussions
Hello Duncan, There is the Generate Geolocation Coordinates from Form Submissions article. I hope, it can help.- 5 replies
-
- geolocation
- coordinates
-
(and 5 more)
Tagged with:
-
Hello artdocent, As far as I know, parameters cannot be entered to the "To" field. You can enter two emails and add any message as a parameter to the Subject. It is not so convenient as different emails, but I hope it helps.
-
Hello jnordstrand, If I understand correctly, you have a table with fields that has DataTypes "Yes/No", and you want to aggregate how many fields has the "Yes" value. In this case, you can add a Calculated field, enter the code like CASE WHEN [@field:yes_no]='True' THEN 1 ELSE 0 END And add the aggregate by this field with Formula SUM.
-
Hello EIQ, As far as I know, aggregate functions cannot work with several fields. I mean, COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek] is the same as COUNT_NON_BLANK / MIN and this formula is applied to all fields that are added to the right-hand panel. If I understand correctly, the DataType of your pUser_QFGoalWeek field is Text255 or Integer. If you change the DataType to Number/General, the result should be 500% but note that values of the same field are counted as "non blank".
- 2 replies
-
- aggregate
- calculated field
-
(and 1 more)
Tagged with:
-
Hello Kimberly, As far as I know, the How To recommends to "Use the Dot Net deployment method for Sharepoint". I hope, it helps.
-
Hide Blank Field In Acknowledgement Email
Jan replied to artdocent's topic in User JavaScript and CSS Discussions
Hello artdocent, If I understand correctly, what your goal is, you can try following steps: 1) Add a Rule: if a user does not select the check box, hide fields of alternate date. 2) Create Hidden virtual fields, where labels of the alternate date fields will be placed; 3) Insert in Acknowledgment email the code like: [@cbParamVirtual1] <cb:field name="secondaddress"/> [@cbParamVirtual2] <cb:field name="thirdaddress"/> If a user does not select to fill alternate date, the virtual fields and values of entered fields will be empty, so nothing will be displayed in the email. 4) Add a Header&Footer element and then enter the code like: <SCRIPT LANGUAGE="JavaScript"> function setFields() { var isSet = document.getElementById("InsertRecordthesameaddress").checked; if (isSet) { document.getElementById("cbParamVirtual1").value = "second address:"; document.getElementById("cbParamVirtual2").value = "third address:"; } } document.getElementById("caspioform").onsubmit = setFields; </SCRIPT> Please enter your field instead of thesameaddress in InsertRecordthesameaddress. And enter your labels for Virtual fields instead of "second address:" and "third address:" I worked with two fields, but you can add as many as you want. Now, if a user selects the check box, labels and values will be added to the email. I hope, it helps.- 2 replies
-
- acknowledgement email
- blank field
-
(and 1 more)
Tagged with:
-
Hello pisaacs, There are two articles in How To about deployment in WordPress: Deploy Caspio DataPages in WordPress Troubleshooting Deployment in WordPress I hope, they can help.
- 12 replies
-
Hello EIQ, There is the standard feature Record Level Security allows to restrict access to records based on the current user’s profile data. For example, based on AccountID. You can see the video about this Feature. It seems, it can help. Also, you can create user-specific redirect after login (video), but in this case it requires to create a separate DataPage for every DataSource. As far as I know, it is impossible to dynamically set the data source of a DataPage.
- 3 replies
-
- parameters
- variable
-
(and 3 more)
Tagged with:
-
Hello EIQ, Maybe, you can use a Conditional Form? You can create two fields, Opt1Child and Opt2Child. If a user selects Opt1, Opt2Chils is hidden and vice versa.
- 4 replies
-
- javascript
- dropdown
-
(and 5 more)
Tagged with:
-
Multiple Criteria For Filtered View
Jan replied to LWSChad's question in Tables, Views and Relationships
Hello EIQ, As far as I know, it is impossible to create several criteria in a View. You can add several Criteria in your Report DataPage, on the Search page. -
It seems, you can find a solution in this topic.
-
Show Cascading Drop Down Value As Text
Jan replied to artdocent's topic in User JavaScript and CSS Discussions
Hello artdocent, You can add the Virtual field, the Header&Footer element and enter the code to Footer: <SCRIPT LANGUAGE="JavaScript"> function set_text2() { var flag = true; var elems2 = document.getElementsByTagName("*"); for (var i=0, m=elems2.length; i<m; i++) { if (elems2[i].id && elems2[i].id.indexOf("InsertRecorddescription") != -1) { var secondDropdown = elems2[i].options[0].text; } } document.getElementById("cbParamVirtual1").value = secondDropdown; } function set_text() { setTimeout(set_text2,500); } window.onload=set_text; elems = document.getElementsByTagName("*"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].id && elems[i].id.indexOf("InsertRecordselection") != -1) { var firstDropdown = elems[i]; } } firstDropdown.onchange=set_text; </SCRIPT> Enter the IDs of your fields instead of InsertRecorddescription, cbParamVirtual1, InsertRecordselection. You can also set another delay in the line setTimeout(set_text2,500); 500 means 500 milliseconds. Now the text from the Description drop down will be displayed in the Virtual field. You can hide the Description drop down by a Rule, set as Criteria Value 1 equal Value 1. I hope, it helps. -
After Login Test That User Table Status Flag Is "enabled"
Jan replied to mbogen52's question in Security, Authentications, Roles, SAML
Mbogen, It seems, you can use solution that is described in this article and in this video. You will use only two groups of users: Enabled and Disabled. And Disabled users will be redirected to the DataPage, that will say "Your account is Disabled". -
Hello cflapt, I think, you can use an Auto-Submit DataPage, if it works for you. You can set this Auto-Submit DataPage as Destination page of your DataPage, and set your DataPage as Destination page of the Auto-Submit DataPage.
-
Js: Concatenate/combine Two Fields Into One Field
Jan replied to leadma's topic in User JavaScript and CSS Discussions
Hello tclemendor, If you work with a Submission form, you can copy the script and change only names like: InsertRecordPosition1 -> InsertRecordFName InsertRecordPosition2 -> InsertRecordLName InsertRecordAllPositions -> InsertRecordUserName There is JS Guide, maybe it can help. -
Merge data field contents and display
Jan replied to grriii's topic in User JavaScript and CSS Discussions
Maybe, this article. -
Passing Info From Search Page To Results Page - And Back
Jan replied to Martin's question in Parameters
Hello Martin, If you want to display parameters in the Header, you can add the Header&Footer element and enter your parameters like [@Day] [@Meal] [@Loc] They should be displayed in one line.