Jump to content

Search the Community

Showing results for tags 'case statement'.

  • 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

Found 3 results

  1. Hi,I am trying to perform a simple calculation in Virtual2 (a calculated field) using a value selected in a multi select dropdown. However, the calculation is failing.Step 1 - I set up a multi select dropdown - List_StringStep 2 - the multi select dropdown field ID cannot be used in a CASE statement therefore I set up [@Virtual1] to capture the selection in the List_String using JavaScriptStep 3 - I then tried some CASE statements in [@Virtual2] to perform a simple calculation based on the List_String selection copied to [@Virtual1]. However, this part isn’t working. I have tried this formula: CASE WHEN '[@cbParamVirtual1]' LIKE '%'+'Car'+'%' THEN 300 END The above formula works with any other field (dropdown, radio buttons, etc) but it will not work with [@cbParamVirtual1]. I wonder if it is because of the data type (when copied from the multi select dropdown) and whether my formula needs to CAST [@cbParamVirtual1] as something that Caspio will recognise as text. Would anyone have any recommendation? Many thanks JayMany thanksJana
  2. Hi, I could do with some wisdom on how to calculate a date. I'm trying to set a date in a field using a CASE statement. I have Virtual Field 1 which is capturing today's date without timestamp (pls see image). I also have a number (in this case 30) stored in Virtual Field 4. I am trying to add the two together and have the result formatted without time stamp (e.g. 25 May 2021) but when I do this I get 31 Jan 1900. See my CASE statement below, the red part is the part that's not working. CASE WHEN DateDiff(day, SysUTCDateTime(), [@field:Date_1]) > [@cbParamVirtual4] THEN DateAdd(day, [@cbParamVirtual4],CONVERT(DATE, '[@cbParamVirtual1]', 103)) ELSE [@field:Date_1] END Many thanks Jay
  3. Greetings, I have a data set with a store with many locations Search form store name manager name Store A = 1 manager Store B = 1 manager Store C = multiple managers for example -CORRECT Store A 123 Somewhere Ave. wish, RR 80012 manager: Popicle Pop - CORRECT Store B 456 Summer Time Hopefully, DD 80014 Manager: Groovy Man The Problem: When I select Store C The results return all the stores assigned to Store C with manager names, however the stores name and address are duplicated, the manager names are unique. Store C - (results returned) 788 Okaywhereissummer Rd AwwwMan, FF 80022 Manager: Boogie Wonderland Store C 788 Okaywhereissummer Rd AwwwMan, FF 80022 manager: Popicle Pop Store C 788 Okaywhereissummer Rd AwwwMan, FF 80022 Manager: Lucy Lunchmeat Store C 788 HereIam Rd AwwwMan, FF 80022 Manager: Dolly DoorKnob Store C 788 HereIam Rd AwwwMan, FF 80022 Manager: Kick Rocks Store c 788 HereIam Rd AwwwMan, FF 80022 manager: Popicle Pop ***The goal: I would like the results to return unique store locations, (so that means all the managers associated to that one store are displayed), and create a link the user will click on and route to the details page, this page will display a snippet of information pertaining to each manager at that store. (see below) Store C 788 Okaywhereissummer Rd AwwwMan, FF 80022 (link > click to details page with snippets of information of the managers associated to this location only) Manager: Lucy Lunchmeat Manager: Boogie Wonderland manager: Popicle Pop Store C 788 HereIam Rd AwwwMan, FF 80022 (link > click to details page with snippets of information of the managers associated to this location only) Manager: Dolly DoorKnob Manager: Kick Rocks manager: Popicle Pop I also need to be able to search on the manager name individually, this result set would return all the stores the manager is assigned to and create a link to the details page that will display a snippet of information pertaining to manager selected. Select manager > Popicle Pops Store C 788 HereIam Rd AwwwMan, FF 80022 (Name: Popicle Pops Link) Store C 788 Okaywhereissummer Rd AwwwMan, FF 80022 (Name: Popicle Pops Link) Whew! Is this possible? I have researched JavaScript (case - switch ) , which I think can be a option, only I don't know where to begin. I'm stuck. Help !! Ideas, Any suggestions on how to achieve this complex search form is greatly appreciated. Hopefully, it's a simple solution. Thanks Dawana
×
×
  • Create New...