添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Hello Caspio community!

I have a little idea but i can't make it work, is something like this:

CASE
WHEN EXISTS ( SELECT name FROM myTable WHERE name = target.[@field:name] ) THEN 1
ELSE 0
END

My problem i get the "Not records found" of Caspio instead of 0 and i don't know where i'm mistaking. In the future I pretend to count how much tickets a client have and show it, if that client never create  a ticket is not going to be in myTicketsTable yet for obvious reasons Hi @HappyAlligator - are you using a Report DataPage? If yes, I suggest using the Filter and Criteria in your Report. Or you can use View instead. For more information, you can check these links:
https://howto.caspio.com/parameters/tech-tip-custom-filter-elements/
https://howto.caspio.com/tables-and-views/what-are-views/creating-a-view-to-filter-data/
https://howto.caspio.com/datapages/reports/search-and-filter-comparison-types/ WHERE My_View_name = target.[@field:name]
but don't work either so i decided to go for something much more simple in the beginning (what i post before) to see if i can make it work.

The problem in general as far i can see is when there is no such target.[@field:name] in my table/view when instead of 0 or NULL i just get "error". @Meekeee maybe you know what to do, i ran out of ideas. My problem in general is to know what Caspio bring when there is no data in the SELECT or in the field of the SELECT.

null, blank, "", " "? If you are getting No records found in the report, make sure that there is at least one record on your Table. Then, to check if the value is existing in the Table or not, you can use this formula:
CASE WHEN (SELECT Count(Name) FROM Table WHERE Name = target.[@field:Name]) < 0 THEN 1 ELSE 0 END
Hope this helps! :) You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.