Forum Discussion
Hey Stephanie,
As Don mentioned, it's difficult to offer guidance without a better understanding of what your hoping to achieve.
The skeleton would look like something like the following, where you'll either return true or false. Note that you can have multiple "tests" within your Formula Checkbox logic.
If (
// Check the box when …
[Some Field Status] = "Active", true,
// Or when …
[# of Some Related Records] > 0, true,
// Default to unchecked
false
)
------------------------------
Brian Seymour
------------------------------
- MarkShnier__You3 years ago
Qrew Legend
I see we are all trying to read Stephanie's mind here. Let's try my mind reading. I think she has a record with an email address on it, and she wants to know if that email exists in another table.
This can be done with the formula query. Example below this would be a formula checkbox field type. But replace the 99 with the field ID in the other table which holds the email address. Would replace this table reference here [_DBID_OF_OTHER_TABLE] with the table name that you will see in the advanced settings for the other table.
var text QUERY =
"{99.EX.'" & [Email Address] & "'}";var number NumEmailsInOtherTable=
Size(
GetRecords($QUERY, [_DBID_OF_OTHER_TABLE]));IF($NumEmailsInOtherTable>0, true)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- StephanieMilbur3 years agoQrew Member
Sorry for making this one diffcult but yes you are all on the right track. mark has the scenario correct and the formula appears to be spot on. I am running a User test soon. Thanks so much
------------------------------
Stephanie Milburn
------------------------------ - StephanieMilbur3 years agoQrew Member
Greetings!
The formula checks regardless of whether or not the email address matches the reference table, how do we get it so that it doesn't check when it doesn't find a match:
var number MATCH = Size(GetRecord(32,[_dbid_table]));
If([Username / Email]="",false,$match!=0,true,false)
Thank you!
------------------------------
Stephanie Milburn
------------------------------- MarkShnier__You3 years ago
Qrew Legend
You did not use the formula that I suggested. Can you tell me the Field ID# in the Other table that has the email address?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------