Jump to content

Search the Community

Showing results for tags 'calculated field'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

  1. Hi Guys, I hope somebody has an idea for this. I'm stuck creating the report, step 3 below. 1) user Bob insert its color preferences on a search web form: Name color1 color2 color3 color4 Bob red blue yellow black 2) it is compared against a table I created with information from other users that also like colors Name color1 color2 color3 color4 John red white orange brown mary purple magenta green grey Elen white green red blue 3) I need to give Bob the best match with the other users of the database. On the report I search by "red" OR "blue" OR "yellow" OR "black" at the same time Table of best matches for Bob (this would be the report) Name "Hits on search" Elen 2 John 1 I hope to be able to do this with a calculated field on my report ("hits on search", on the example) and sort by it. Somebody suggested to use COUNT, but that counts vertically across users, if I understood correctly: (times "red" showed up under the color1 column, for example) Any idea would be appreciated. Thanks V.
  2. Hey everyone, I need some help. I tried to reference to record index in calculated field on results page, however it seems that this parameters is available in html block and header footer only. Is there any workaround? I need to multiply record index and rate field. Thanks!
  3. I have a report that has a calculated field in it that is based on a conditional statement. For one of the options, I would like it to multiply a field by the value of an input box. I can't figure out how to do it though. I've tried passing the value as an external parameter in the URL but I can't figure out how to reference that in the calculated field formula. Right now the input field is on the web page that the Caspio iframe is embedded on, but I can also move the input to the header of the form if that would help. Is there a way to do this? I'm using the code below... CASE WHEN [@field:Per]='lamp' THEN [@field:Per] * 2 WHEN [@field:Per]='fixture' THEN [@field:Cost] * EXTERNALPARAMETER ELSE 0 END
  4. Hi, I'm stumped. This code works Substring([@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2,Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2) This code breaks with only a minor adjustment: changing + to - at the very end Substring([@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2,Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) - 2) This code is a substring in example two that works until I add it to the code above Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) - 2 Any help will be appreciated
  5. I'm trying to use a calculated field for a Sum in another calculated field on a tabular datapage (the aggregation won't work for this particular sum, as the sums are for group headers). This is a complicated series of totals so hopefully the process can be followed through. a) I have 2 calculated fields (that are SELECT) to determine some totals and then a 3rd calculated field that 'decides' which one to use for it's own value: Calculated Field:3 CASE WHEN myfield=1 THEN [@calcfield:1] ELSE [@calcfield:2] END I need to now do a Sum for calculated field 3. I've tried a lot of syntax but cant' get it to work (again, I can't use the standard aggregation). Does anyone know how to do this?
  6. I have a tabular report with search page . In the search page, I send a parameter with a start date on which I seek ( [ @beginyear ] ) to the resulting page . In the Calculated Field in the resultpage i like to have: search date ( [ @ beginning year ] = 1-1-2016 Record: Start date item item [ @field : begin_date_item ] = 5-5-2016 result: Calculated Field = 5-5-2016 [@field: begin_date_item ] Or Record: Start date item item [@field: begin_date_item ] = 12-4-2015 result: Calculted Field = 1-1-2016 ( [ @ beginning year ] Unfortunately, this does not works. It seems that the parameter of the search page is not working with the proper date format , somebody ideas CASE WHEN [@field:begin_date_item]<[@beginyear] THEN [@beginyear] ELSE [@field:begin_date_item] END
  7. Hi all, Is it possible to process HTML in an Calculated Field. In the code below, I would like to change the text in an image. CASE WHEN [@field:PAARD_KOPPELINGEN_soort_koppeling]= 1 THEN 'Ruiter/Verzorger koppeling: [@field:GEBRUIKERS_volledige_naam]' ELSE 'Stal medewerker koppeling: [@field:STAL_GEGEVENS_stalnaam]' END Regards Peter
  8. Hi, as the Title suggests, I want to aggregate calculated fields. This is not allowed via a standard Aggregation. Is there a workaround for this? Thanks
  9. Hi all, I want to hide the submit button in a details page based on the value of five calculated fields. I saw this post from before: http://forums.caspio.com/index.php/topic/5131-hide-button-based-on-calculated-field/ Based on the advice there, I came up with the following: <script language="javascript"> var stat='[@calcfield:2]'; if (stat.length='Not Equal, please revise figures') { coauthor = stat; document.write(stat); document.getElementById("Mod0EditRecord").style.display = "none"; } </script> But I have been unable to get that script to work for me properly. As is, it does not hide the submit button but rather shows the button and the text "Not Equal, please revise figures" below the submit button.(see attached) Also, the script is for only one calculated field and I would like the javascript to include five. Any help would be much appreciated.
  10. Hello; I am working with a report and aggregate functions. I am trying to get a percentage toward a goal. ((COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek])) Should result in a percentage for completed QuotesFinished to QuotesFinishedPerWeekGoal, but it results in zero. For diagnostic purposes I've checked the following formulas... COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT] = 2 (correct) (MIN [@pUser_QFGoalWeek])) = 10 (correct) ((MIN [@pUser_QFGoalWeek]) / (COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT])) = 500.00% (correct) ((COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek])) = 0.00% (incorrect) Can anyone spot what I'm doing wrong? Thank You!
  11. I'm using the below select statement in a calculated field, the resultset works great in the html grid when I fire the datapage, but when I export the datapage the columns are blank. I am able to get results if I change the values from 'true' and 'false' to 1 and 0. Has anyone run into this? We would like the text value of either 'true/false' or 'yes/no' Thanks, -John select case when sum(b.CCO_Place_Points) > [@field:State_Points_Required_Required_Points] then 'True' else 'False' end from JRRESULTSTABLENEW a join Lookup_Places_2 b on b.CCO_Place_ID = a.CCO_PlaceID where a.MemberID = [@field:JRCOOKSLISTING_MemberID]
×
×
  • Create New...