Definition. Let $f(n)$ be the least number $m$ such that $$\forall S\subseteq\binom{[m]}3\ \exists X\in\binom{[m]}n\ \forall Y\in\binom X4\ \left|S\cap\binom Y3\right|\in\{0,2,4\}.$$
In human language: given any family $S$ of $3$-element subsets of $\{1,\dots,m\},$ we can find an
$n$-element set $X\subseteq\{1,\dots,m\}$ such that, for each $4$-element set $Y\subseteq X,$ either all or half or none of the $3$-element subsets of $Y$ belong to $S.$
My question: Is there any literature on this function $f(n)$?
Here are some trivial relationships with standard Ramsey numbers.
Easy upper bounds:
$f(n)\le R(n,n;3).$
$f(4)=5\lt R(4,4;3).$
$f(n)\le R(5,n;4).$
Easy lower bounds:
$ES(n)\le f(n),$ where $ES(n)$ is the least number $m$ such that any set of $m$ points in the plane, no three of which are collinear, contains the vertices of a convex $n$-gon.
$R(m+1,n+1;3)\le f(R(m,n;2)+1).$
This looks like a special case of zero-sum Ramsey, which is defined as follows: Given a function $f:E(K_n^r)\to\mathbb{Z}_k$ ($K_n^r$ is the $r$-uniform clique on $n$ vertices), a zero-sum copy of an $r$-graph $G$ under $f$ is a copy $G'\subseteq K_n^r$ of $G$ so that $\sum_{e\in E(G')}f(e)=0$ in $\mathbb{Z}_k$. Then $R(G,\mathbb{Z}_k)$ is the least $n$ for which there is a zero-sum copy of $G$ under any $f:E(K_n^r)\to\mathbb{Z}_k$.
In your case, you are considering $f:E(K_n^3)\to\mathbb{Z}_2$ which is just defined by whether or not the edge is in $S$. Then what you're looking for is exactly a zero-sum copy of $K_4^3$ under $f$.
The paper ``On three zero-sum Ramsey-type problems'' by Alon and Caro http://www.cs.tau.ac.il/~nogaa/PDFS/zero.pdf may have useful information for you.