I have developed an app that provides points, and the administrator has set a limit of 1 provision per day for the [user account] worker. The app works well on the mobile version, but on the PC desktop version, the "1 provision per day" message is still appearing even though the provision is being made only once a day. What could be the reason for this?
IF(
Userrole() = "Admin",
TRUE,
IF(
Userrole() = "User",
IF(
COUNT(
FILTER(
"Thumbs Up",
AND(
[email] = [_THISROW].[eamil],
YEAR([point day]) = YEAR([_THISROW].[point day]),
MONTH([point day]) = MONTH([_THISROW].[point day]),
DAY([point day]) = DAY([_THISROW].[point day])
)
)
) = 1,
FALSE,
TRUE
),
FALSE
)
)
Solved! Go to Solution.
Hi @seyoonkwon
Mobile and Desktop interfaces should be consistent. If not, please file a ticket with the support here: Contact Us - AppSheet Help
At looking to your expression, I would suggest a slight simplification:
IF(
Userrole() = "Admin",
TRUE,
IF(
Userrole() = "User",
IF(
COUNT(
FILTER("Thumbs Up",
AND(
[email] = [_THISROW].[eamil],
YEAR([point day]) = YEAR([_THISROW].[point day]),
MONTH([point day]) = MONTH([_THISROW].[point day]),
DAY([point day]) = DAY([_THISROW].[point day])
)
)
) = 1,
FALSE,
TRUE
),
FALSE
)
)
into:
OR(
USERROLE() = "Admin",
AND(
USERROLE() = "User",
COUNT(
FILTER("Thumbs Up",
AND(
[email] = [_THISROW].[email],
YEAR([point day]) = YEAR([_THISROW].[point day]),
MONTH([point day]) = MONTH([_THISROW].[point day]),
DAY([point day]) = DAY([_THISROW].[point day])
)
)
) <> 1
)
)
Hi @seyoonkwon
Mobile and Desktop interfaces should be consistent. If not, please file a ticket with the support here: Contact Us - AppSheet Help
At looking to your expression, I would suggest a slight simplification:
IF(
Userrole() = "Admin",
TRUE,
IF(
Userrole() = "User",
IF(
COUNT(
FILTER("Thumbs Up",
AND(
[email] = [_THISROW].[eamil],
YEAR([point day]) = YEAR([_THISROW].[point day]),
MONTH([point day]) = MONTH([_THISROW].[point day]),
DAY([point day]) = DAY([_THISROW].[point day])
)
)
) = 1,
FALSE,
TRUE
),
FALSE
)
)
into:
OR(
USERROLE() = "Admin",
AND(
USERROLE() = "User",
COUNT(
FILTER("Thumbs Up",
AND(
[email] = [_THISROW].[email],
YEAR([point day]) = YEAR([_THISROW].[point day]),
MONTH([point day]) = MONTH([_THISROW].[point day]),
DAY([point day]) = DAY([_THISROW].[point day])
)
)
) <> 1
)
)
Thanks!!
User | Count |
---|---|
18 | |
13 | |
8 | |
4 | |
2 |