Hey @nocodebuilder, welcome to the community.
First: you might check out the following post, it’s full of tons of helpful tips to help you get stared with using the community to find answers.
[Guide on How To Create a Community Post](https://community.appsheet.com/t/guide-on-how-to-create-a-community-post/35855/1) Tips & Tricks ?
Dear valuable members and users, For a long time I’m seeing a lot of multiple and concurrent posts, posts like novels seeming to aim the Pulitzer Price, exactly the same questions by the same user but paraphrased/re-phrased etc. Being a dedicated community member and an AppSheet developer who is reading around 2.5K posts per day, I urged myself to tip on some good advice and best practice BEFORE posting something in the community: #1 - APPSHEET DOCUMENTATION AppSheet has a very good help do…
To answer your question
-
You can absolutely do something like that.
To give you an example, here’s a formula that I use to control content inside (what I call) an enhanced dashboard.
and(
if(ISNOTBLANK(index(Current_User[User_Current_Fields], 1)),
in([Trapping_Location_Field_Link], LIVE_Scouting_Fields[Farm_FieldsID]),
in([Trapping_Location_Farm_Link], LIVE_Scouting_Farms[GrowerFarmsID])
),
if(ISNOTBLANK(index(Current_User[User_Crop_Type_Filter], 1)),
IN([Trapping_Location_Crop_Type],
split(CONCATENATE(Current_User[User_Crop_Type_Filter]), " , ")
),
true),
if(ISNOTBLANK(index(Current_User[User_Trap_Type_Filter], 1)),
isnotblank(INTERSECT(
[Trapping_Location_Trap_Types],
split(CONCATENATE(Current_User[User_Trap_Type_Filter]), " , ")
)),
true)
)
Here’s another one from a report builder in a client’s app
- It takes criteria entered by a user and finds the associated records that match all that criteria.
SELECT(patient_enrollment_records[PatientEnrollmentID],
AND(
IN([patient_link], [_ThisRow].[Report_Patient_Filter]),
IF(isnotblank([_ThisRow].[Report_Hospital_Link]),
[_ThisRow].[Report_Hospital_Link] = [Hospital_discharged_from],
TRUE),
IN([facilities_link], [_ThisRow].[Report_Facility_Filter_ID_List]),
SWITCH([_ThisRow].[Report_Status_Filter],
"Active",
AND(
[Enrollment_Active] = TRUE,
IF(IsNotBlank([_ThisRow].[Report_Date_Min]),
[Enrollment_Date] >= [_ThisRow].[Report_Date_Min],
TRUE),
IF(IsNotBlank([_ThisRow].[Report_Date_Max]),
[Enrollment_Date] <= [_ThisRow].[Report_Date_Max],
TRUE)
),
"Discharged",
AND(
[discharge] = TRUE,
IF(IsNotBlank([_ThisRow].[Report_Date_Min]),
[discharge_date] >= [_ThisRow].[Report_Date_Min],
TRUE),
IF(IsNotBlank([_ThisRow].[Report_Date_Max]),
[discharge_date] <= [_ThisRow].[Report_Date_Max],
TRUE)
),
OR(
AND(
OR(
[Enrollment_Date] >= [_ThisRow].[Report_Date_Min],
[discharge_date] >= [_ThisRow].[Report_Date_Min]
),
OR(
[Enrollment_Date] <= [_ThisRow].[Report_Date_Max],
[discharge_date] <= [_ThisRow].[Report_Date_Max]
)
),
AND(
[Enrollment_Date] <= [_ThisRow].[Report_Date_Max],
IsBlank([discharge_date])
)
)
),
IF(IsNotBlank([_ThisRow].[Report_Discharge_Reason_Filter]),
IN([status], [_ThisRow].[Report_Discharge_Reason_Filter]),
TRUE),
IF(IsNotBlank([_ThisRow].[special_status_filter]),
IN([Patient_Link].[Special_Status], [_ThisRow].[special_status_filter]),
TRUE),
IF(IsNotBlank([_ThisRow].[Report_Acute_Chronic_Filter]),
IN([Acute_or_chronic], [_ThisRow].[Report_Acute_Chronic_Filter]),
TRUE)
),
TRUE
)
I know… that’s a bit crazy
- To help break it down, here’s a 7min long video explaining how it works.
It’s all about getting the information the system needs… into the system’s hands, and figuring out the logic to accomplish what you’re looking for.