Jump to content

kme

Members
  • Content Count

    24
  • Joined

  • Last visited

  • Days Won

    2
  1. Hello, There is one column on the Results Page where there are duplicates. How do I make the column have only distinct values? Thanks.
  2. How do you store the Calculated Field values into a table? I'd like it done automatically as the value is being calculated.
  3. Does anyone know of a workaround for this, without having to pay the support team for customization?
  4. When creating a Report DataPage, one of the first things you can do is "Select Filtering Data". When I've selected a field, I want the filtering value to be from a View (which is not part of this DataPage's data source). The View itself has filters and contains only one row, which contains the value that I want to filter the DataPage with. Is there anyway that I can select the value from the View and input it into the DataPage filter value field?
  5. One field, titled FullText, on a Details Page is a long text, like: 01 TEXT TEXT TEXT TEXT TEXT 02 TEXT TEXT TEXT 03 TEXT TEXT TEXT TEXT TEXT TEXT 04 text text text text 05 text 06 text text 07 text text text 08 text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 09 text text text text text text text text text text text text text text text text text text text text text text text text How do I format it so that it becomes like: 01 TEXT TEXT TEXT TEXT TEXT 02 TEXT TEXT TEXT 03 TEXT TEXT TEXT TEXT TEXT TEXT 04 text text text text 05 text 06 text text 07 text text text 08 text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 09 text text text text text text text text text text text text text text text text text text text text text text text text ? JavaScript in an HTML block / footer?
  6. Thank you so much, the fields are non-editable and everything is working now. Here is my code: <script> document.getElementById('EditRecordSupportReadyYes').disabled= true; document.getElementById('EditRecordSupportRequiredYes').disabled= true; document.getElementById('EditRecordSupportRequired0').onclick= function () { if (document.getElementById('EditRecordSupportRequired0').value == 'Y'){ var currentdate = new Date(); var datetime = (currentdate.getMonth()+1) + "/" + currentdate.getDate() + "/" + currentdate.getFullYear() + " " + currentdate.getHours() + ":" + currentdate.getMinutes(); document.getElementById('EditRecordSupportRequiredYes').disabled= false; document.getElementById('EditRecordSupportRequiredYes').value = datetime; document.getElementById('EditRecordSupportRequiredYes').disabled= true; } } document.getElementById('EditRecordSupportRequired1').onclick= function () { if (document.getElementById('EditRecordSupportRequired1').value == 'N'){ document.getElementById('EditRecordSupportRequiredYes').disabled= false; document.getElementById('EditRecordSupportRequiredYes').value = ""; document.getElementById('EditRecordSupportRequiredYes').disabled= true; } } document.getElementById('EditRecordSupportReady0').onclick= function () { if (document.getElementById('EditRecordSupportReady0').value == 'Y'){ var currentdate = new Date(); var datetime = (currentdate.getMonth()+1) + "/" + currentdate.getDate() + "/" + currentdate.getFullYear() + " " + currentdate.getHours() + ":" + currentdate.getMinutes(); document.getElementById('EditRecordSupportRequiredYes').disabled= false; document.getElementById('EditRecordSupportReadyYes').value = datetime; document.getElementById('EditRecordSupportReadyYes').disabled= true; } } document.getElementById('EditRecordSupportReady1').onclick= function () { if (document.getElementById('EditRecordSupportReady1').value == 'N'){ document.getElementById('EditRecordSupportRequiredYes').disabled= false; document.getElementById('EditRecordSupportReadyYes').value = ""; document.getElementById('EditRecordSupportReadyYes').disabled= true; } } function enableElements(){ document.getElementById('EditRecordSupportRequiredYes').disabled= false; document.getElementById('EditRecordSupportReadyYes').disabled= false; } document.getElementById("caspioform").onsubmit=enableElements; </script> I had to add the function at the end and extra .disabled lines everywhere because initially the .disabled made it so that when I clicked Update, the timestamps wouldn't show. =) Thanks again.
  7. So there is no way to do it, whether with Javascript or..?
  8. Is there a way to create a search filter for a calculated field?
  9. This is the solution: SELECT TOP 1 RonOpportunity FROM Routing_1 WHERE RonOpportunity !='' AND Current_Open_NEF_Data_Ship=AcNum
  10. This is the SQL that works, for Table A and Table B. Table B is the data source for the DataPage, and Table A isn't. I want to update Table B's column "City" according to Table A's column "Letter". TABLE A +----------+-------+ | Number | Letter| +----------+-------+ | 1 | A | | 1 | | | 1 | | | 2 | | | 2 | | | 3 | | | 3 | B | | 3 | | | 3 | C | +----------+-------+ TABLE B +--------+-------+ | AC | City | +--------+-------+ | 1 | A | | 1 | A | | 1 | A | | 1 | A | | 2 | | | 2 | | | 2 | | | 2 | | | 3 | B | | 3 | B | | 3 | B | +--------+--------+ UPDATE TableB SET City = Letter FROM ( SELECT Number, Letter, ROW_NUMBER() OVER(PARTITION BY Number ORDER BY number ) AS SortOrder FROM TableA WHERE Letter IS NOT NULL AND Letter != '' ) AS A WHERE SortOrder = 1 AND TableB.AC = A.Number; Where do I add this code and format it for it to work in the DataPage?
  11. Thanks so much. How do I make it so that the aircraft number in "(aircraft number) not complete; please process." refers to the number the user typed into the form?
  12. There is a form where user can input aircraft number, and records/results are shown accordingly. When there are no records found, it says "No records found". However, I want the text to say "(aircraft number) not complete; please process." How do you do this? Thanks for any help.
  13. For those interested in the solution: CAST(Datediff(hour, [@field:SupportRequiredYes], [@field:SupportReadyYes])/24 AS CHAR(15)) + 'days ' + CAST(Datediff(hour,[@field:SupportRequiredYes], [@field:SupportReadyYes])%24 AS CHAR(15)) + 'hours'
  14. [Please skip to the first comment that I posted] On this DataPage: http://b4.caspio.com/dp.asp?AppKey=b05320005057b918f4354d1992ba I want the TimeDifference column to have the difference between the 'SupportRequiredYes' and 'SupportReadyYes' timestamps, in days and hours. What is the simplest way to do this? This is what I have so far, but there has to be an easier way. The code is after the comment "//TIME DIFFERENCE". This has it so that when 'SupportReadyYes' radio button on the Details Page is clicked Yes, the time difference is calculated. <script> document.getElementById('EditRecordSupportRequired0').onclick= function () { if (document.getElementById('EditRecordSupportRequired0').value == 'Y'){ var currentdate = new Date(); var datetime = (currentdate.getMonth()+1) + "/" + currentdate.getDate() + "/" + currentdate.getFullYear() + " " + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); document.getElementById('EditRecordSupportRequiredYes').value = datetime; } } document.getElementById('EditRecordSupportReady0').onclick= function () { if (document.getElementById('EditRecordSupportReady0').value == 'Y'){ var currentdate = new Date(); var datetime = (currentdate.getMonth()+1) + "/" + currentdate.getDate() + "/" + currentdate.getFullYear() + " " + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); document.getElementById('EditRecordSupportReadyYes').value = datetime; //TIME DIFFERENCE FUNCTION var supportready = document.getElementById('EditRecordSupportReadyYes').value; var supportready_date1 = supportready.split('/', 1).join('/').length; //finding the position of the first '/' character var supportready_date2 = supportready.split('/', 2).join('/').length; var supportready_date = supportready.substring((supportready_date1)+1, (supportready_date2)); //finding the date value, between the first two '/' characters var supportrequired = document.getElementById('EditRecordSupportRequiredYes').value; var supportrequired_date1 = supportrequired.split('/', 1).join('/').length; var supportrequired_date2 = supportrequired.split('/', 2).join('/').length; var supportrequired_date = supportrequired.substring((supportrequired_date1)+1, (supportrequired_date2)); if (supportrequired_date>supportready_date){ var datediff = (31-supportrequired_date)+parseInt(supportready_date); //the '31' still needs to be tweaked according to each month } else{ var datediff = supportready_date - supportrequired_date; } var supportready_time1 = supportready.split(' ', 1).join(' ').length; var supportready_time2 = supportready.split(':', 1).join(':').length; var supportready_time = supportready.substring((supportready_time1)+1, (supportready_time2)); var supportrequired_time1 = supportrequired.split(' ', 1).join(' ').length; var supportrequired_time2 = supportrequired.split(':', 1).join(':').length; var supportrequired_time = supportrequired.substring((supportrequired_time1)+1, (supportrequired_time2)); if (supportrequired_time>supportready_time){ var timediff = (24-supportrequired_time)+parseInt(supportready_time); var datediff = datediff-1; } else{ var timediff = supportready_time - supportrequired_time; } document.getElementById('EditRecordTimeDifference').value = datediff + " days " + timediff + " hours"; } } </script> I can keep what I have so far, except it gets so tedious when I have to consider a case like finding the difference between "3/29" and "4/4", where I have to see which month has 30 days or 31 days, etc. It's a pain. I don't think the built-in Datediff function would work because the timestamp was formatted manually with JavaScript, as a text. Any thoughts?
  15. [Please skip to the first comment I made] I have a slightly complicated procedure I'd like to implement. DataPage D's data source is from View V In the Results Page of DataPage D, I'd like to include a field F that's from Table T But Table T is not included in View V. This is a sample Table T: [iD] [fieldF] 1 A 1 1 B 2 2 C 2 2 3 3 This is a sample View V, according to Table T: [iD] [fieldF] 1 A 1 A 1 A 1 A 1 A 1 A 2 C 2 C 2 C 3 3 3 3 3 3 ID from Table T = ID from View V Here is how field F in View V is inputted: The top most field F value for ID 1 is A, so all field F for corresponding ID's will be A. The top most field F value for ID 2 is C (blank is not included), so all field F for corresponding ID's will be C. There are no field F value for ID 3, so all field F for corresponding ID's will be blank. Periodically the top most row will be removed, and then new values will be added, etc. though I'm not sure if that really matters. Now how do I do this? Here are some problems I'm thinking: - There needs to be a way to link Table T's ID with View V's ID, when Table T is not included in View V Here are the steps I'm thinking: 1. In View V, create a new field/column for the Results Page, named fieldF 2. For each ID in View V, select Table T ID's field F 3. Loop through the field F values from top to bottom to search for the top most value, like I explained above. If there are no values, leave blank. 4. Populate all of the View V's field F for each ID ..How do you code this?! Thanks for any help
×
×
  • Create New...