Search the Community
Showing results for tags 'statements'.
Hi, I have a Details Datapage where i would like to use a SELECT statements to pull data another table into a Virtual Calculated Field. It goes well so far as pulling the count across all Company_ID's, but when I add RLS to the statement values turn 0 even though the formula is verified. - Both, Booking_Status & Assign_To are in the table Bookings - Assign_To is a text field (255) that match the [@authfield:Company_Users_tbl_Company_ID] I have tried various combinations and expression like: 1. SELECT COUNT(DISTINCT Booking_Status) AS Pending FROM Bookings WHERE Assign_To = '[@authfield:Company_Users_tbl_Company_ID]' 2. SELECT COUNT(Booking_Status) from Bookings WHERE Booking_Status='Pending' AND Assign_To = '[@authfield:Company_Users_tbl_Company_ID]' Though, the formulas are both verified but not working as they return 0, i think perhaps that the table field Assign_To needs to have a FROM Bookings reference, this i have tried as well without luck. I would appreciate very much if anyone have suggestions to a correct statements. Sincerely Ras