Contains useremail()

My expression is not working withe

USEREMAIL()

I have two tables:

 

First Table ( TASKS )

NO TASKS
1 Contact With AppSheet to Solve user's problem
2 Computer hardware request

 

Second Table ( TASKS WITH )

TASKS NO ID GMAIL
2 JOY USER1@GMAIL.COM
2 IZZAT USER2@GMAIL.COM
2 MOHMMAD USER3@GMAIL.COM

___________________________________________________________

In the slides, I used the following expression inside the row filter condition for the table (tasks), This is to show only the special tasks of the program user by e-mail

CONTAINS(USEREMAIL(),[Related TASKS WITHs][GMAIL])

 

 

 

Solved Solved
3 13 1,702
1 ACCEPTED SOLUTION

 

I follow another way and work perfect, this my steps

  1. I create Slices name TASK WITH by table TASKS WITH with this expression USEREMAIL()=[gmail]

 

 

 

  1. From Data>Columns in my table TASKS i use in the virtual column [Related TASKS WITHs] this expression REF_ROWS("TASK WITH", "TASKS NO")

 

 

 

  1. From Element type details / Referenced table name i use my Slice name TASK WITH (Slice)

 

View solution in original post

13 REPLIES 13

Do you want to show only the related tasks with GMAIL = USEREMAIL()?

SELECT(Related TASKS WITHs[KEY], USEREMAIL() = [GMAIL])

Hi @perissf

[Related TASKS WITHs] names of Columns in table names TASKS , it will not work with this expression

SELECT(Related TASKS WITHs[KEY], USEREMAIL() = [GMAIL])

Ah ok sorry I didnโ€™t read carefully the question. Itโ€™s a slice filter condition.
This should work:

IN(USEREMAIL(), [Related TASK WITHs][GMAIL])

CONTAINS() checks in a string, while IN() checks in a list.

@perissf

I can not see any Tasks registered in my e-mail If i use your expression

IN(USEREMAIL(), [Related TASK WITHs][GMAIL])


I see the same problem in my test case as well.
@MultiTech_Visions since you have been here for a long time, can you explain this?
I see the filtered records correctly under Slice > View Data, and also in Test of the Row Filter Condition. But in the View there are no data.

This might be of help as well

@MultiTech_Visions

I canโ€™t find what iโ€™m looking about for my app in your link

Youโ€™re running into a rare and esoteric bug - but itโ€™s not really a bug, itโ€™s just a difference between how formulas are evaluated.

I tried to find the post from back in the Google+ days where Praveen was talking about this, but I couldnโ€™t find it.


It deals with the fact that the Expression Assistant (and the whole โ€œtest my formulaโ€ thing) works using one formula evaluation engineโ€ฆ

  • and the actual app uses a different one.

While theyโ€™re nearly identical, there are some very rare instances where things donโ€™t match upโ€ฆ like what youโ€™re finding here.

Ultimately the solution is to change the formula youโ€™re using

  • You need to find another way of accomplishing the same thing.

In your case:
3X_1_6_1673f6c2a803f28b65fb54541f07cdad92fe554e.png

I would try the following:

IN(UserEmail(), SPLIT(CONCATENATE([Related TASKS WITHs][GMAIL]), " , "))

Many times when youโ€™re using a list dereference, you have to apply some โ€œformattingโ€ to it in order for the system to understand it.

  • (I imagine at some point this will be ironed out, but for now itโ€™s necessary to make list dereferences work in some instances.)

If that doesnโ€™t workโ€ฆ

Then what I would do is take your list dereference and make it an actual column - then use that column in your formula instead.

You are a genius!
Nasty bug!!!
And very elegant solution!

 

I follow another way and work perfect, this my steps

  1. I create Slices name TASK WITH by table TASKS WITH with this expression USEREMAIL()=[gmail]

 

 

 

  1. From Data>Columns in my table TASKS i use in the virtual column [Related TASKS WITHs] this expression REF_ROWS("TASK WITH", "TASKS NO")

 

 

 

  1. From Element type details / Referenced table name i use my Slice name TASK WITH (Slice)

 

Outstanding solution write-up!

Okayโ€ฆ Now that Iโ€™ve read everything a couple of times, I get it now.

You only want to create a slice of a table, where the child records of that table contain the email of whoever is using the app.

Final Answer

Inside your Tasks table, create a virtual column that list dereferences all the emails out of the [Related TASKS WITHs]

  • This way you have an actual list of emails on each task level.
    • Name: [Included_Emails]
    • Formula: [Related TASKS WITHs][GMAIL]
    • This should produce a list of emails

Then use that column inside your slice formula:

IN(USEREMAIL(), [Included_Emails])

@MultiTech_Visions
Really your a genius and im so happy for your help. i will try your idea now
@perissf Thank you for you help

Top Labels in this Space