Filter row in form looking up value on a different table

maiga
New Member

Table 1 name โ€œsubmissionโ€ has columns named [user] [key result 1], [key result 2].

Table 2 name โ€œcheck inโ€ has columns named [user] [date] [Input 1] [Input 2].

Question:
For some users, [key result 2] is empty. For these users, the check-in form should not ask for [input 2]

I canโ€™t figure out how to filter out [input 2] from the check in form depending on the user and the value of [key result 2].

I tried to apply this filter but it is not working

ISNOTBLANK(lookup(USEREMAIL(), โ€œSubmissionโ€, โ€œuserโ€, โ€œKey Result 2โ€))

Apologies in advance if this is a really simple question.

Thank you,
Maiga

0 6 451
  • UX
6 REPLIES 6

@maiga
If your Submission table contains more than 1 record for any single user, than the LOOKUP expression will return the 1st matching rowโ€™s [Key Result 2] column value.

Try Filter()

maiga
New Member

Thank you @FREDY_ORTEGON and @LeventK for the reply.

The โ€œSubmissionโ€ table has only 1 record per user. This is why I want to use it as a reference.

This is what I want:

column [input 2] from table โ€œcheckinโ€ does not show in the form

when:

column [key result 2] (from table โ€œsubmissionโ€) is empty for the same [user].

  • I tried filter() but I canโ€™t make it work.
  • The lookup formula is correct but I still see the colum in the form view
    ISNOTBLANK(lookup(USEREMAIL(), โ€œSubmissionโ€, โ€œuserโ€, โ€œKey Result 2โ€))
  • I was thinking of a show_if restriction on the column but Iโ€™m not sure where to put that or how to do it.

Iโ€™ll give a try tomorrow with fresh eyes but if there is an obvious solution I would very much appreciate it.

Thank you both!

Hello, from what I can understand in the formula, you are looking for the email in a table and if it is correct, then this formula would return โ€œTrueโ€, is it correct? If so, then use the formula IN for example:

in ( useremail (), records [Email_registered])

use this formula in the field show if the column you want to be displayed or not. the IN formula validates if the user is already registered, if registered it returns โ€œtrueโ€, then at this moment the field you want is displayed. Let me know if Iโ€™m helping

Your reply helped me see that I was looking for the wrong info. Thank you.

You could try an alternate show_if formula
COUNT(SELECT (Submissions [key_result2],[user]=USEREMAIL ()))=0
However you seem to say that your formula is working so Iโ€™m not sure what the issue could be.

Top Labels in this Space