How to create a matching algorithm to connect two users based on search criteria and their user profile data

Hello,

I want to know if I could create a matching algorithm that would be able to connect two users together with the result being the same as a rider matching with a driver on Uber or Lyft. Is this possible? I am new to this forum, so please let me know if I should be posting this elsewhere.

Thank you!!

2 Likes

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.

4 Likes

Wow, incredible. I am not a programmer, not even a technical person, so I don’t have the ability to put in any code unless I’m told exactly what code to put in and how, but the 7 minute video you included that I am going to watch looks like it might be a solution. Would that turn that translate that SQL algorithm into logic for the app or would it be doing something else? I’m just trying not to place any of my own assumptions on it. Thank you!

1 Like

nocodebuilder:

Would that translate that SQL algorithm into logic for the app, or would it be doing something else? I’m just trying not to place any of my own assumptions on it. Thank you!

You’ll have to develop your own version, obviously column names and tables and things will be named differently; but yeah you should be able to devise a formula that takes one set of criteria and matches it against another.

Note:

  • SELECT() in AppSheet is essentially the SELECT-function from the SQL world
    • Only with AppSheet syntax, and you only get 1 column
  • It’s doing the same thing: it’s a query
  • SELECT(table_name[column1], condition)

Learn more about sql select here

1 Like

Whoah. I did not know that Appsheet was actually a low code platform. Wish they had a customer service live chat to help with that.

To make sure that I’m understanding you correctly, in developing my own version, I can accomplish creating this matching algorithm

1 Like

nocodebuilder:

Wish they had a customer service live chat to help with that.

Kinda what this community is for!

3X_d_5_d51363a862e7ab883241c312ac5d7f271579cdd3.gif

nocodebuilder:

I can accomplish creating this matching algorithm

Yep!

1 Like

Kinda what this community is for!

I have never experienced an online dev community this supportive before. It’s inspiring.

3 Likes

nocodebuilder:

It’s inspiring

Together We’re Stronger

3X_9_1_91a384c900eb963b0c73fcaa14cdef5ae95ba01f.gif


Here’s another example, with some more step-by-step


3X_8_1_814aaa6bd43c33bd4eb1708ad3a57d62b8e99bec.jpeg

3 Likes

Indeed.

Looking at their plans again, is there a way to limit how many people could use the app as a consumer facing mobile app?

1 Like

nocodebuilder:

Is there a way to limit how many people could use the app as a consumer facing mobile app?

Negative

  • The whole point of a public app is that it’s open to everyone.
1 Like