Hi,
I did not find a proper answer of my problem...
I have two tables - on of the table contains data to children and the other table contains timestamps and other stuff for child care.
Here an example of the first table:
ChildID | Vorname | Nachname | Eintrittsdatum | Austrittsdatum | Geburtsdatum | BetreuungspersonEmail |
svsdvsb | Max | Mustermann | 01.01.2022 | 17.05.2013 | susi.mayer@test.xy |
The second table is this example
TimeID | Vorname | Kommen | Gehen | ... |
cssdviub | Max | 08:00 | 12:25 |
The column "Vorname" is a reference to the first table.
Now my problem...
I have created a slice for the first and for the second table to show only this row, where the "Austritt" is empty. For the child table the slice is working and I can use it within a view. The row filter condition is "AND((USEREMAIL() = [BetreuungspersonEmail]), (ISBLANK([Austrittsdatum])))".
The row condition within the second table does not work, although appsheet tells me that it has been correctly defined.
The condition is: "AND((USEREMAIL() = [Vorname].[BetreuungspersonEmail]), ISBLANK([Vorname].[Austrittsdatum]))"
I see within the view, where I have linked the slice from the second table all the children no matter whether with or without "Austrittsdatum" and no matter whether the registered user matches the email address.
I hope you can hep me.
thx.
Solved! Go to Solution.
Ref columns need to contain the key value of the referenced record. Presumably the key value would be the column with "id" in its name, not "vorname". In other words, change "Max" in the 2nd table, to "svsdvsb".
https://help.appsheet.com/en/articles/961426-references-between-tables
sorry, I need to ask you again...
I have build the two tables new and inserted some default values for testing:
ChildID | FirstName | LastName | EntryDate | ExitDate | Mother | Father | BirthDay | Age | CareHours | Remarks | CareGiver | CareGiverEmail |
f5bc683c | Max | Meier | 29.07.2000 | Woman | Man | 01.01.1995 | 28 | 20 | Martin Huber | test@huber.de | ||
36787be8 | Lisa | Test | 01.07.2020 | Woman | Man | 01.01.2000 | 23 | 80 | Susi Schmidt | susi@schmidt.de |
When I start the slice view for the children table with the row filter condition:
AND((USEREMAIL() = [CareGiverEmail]), (ISBLANK([ExitDate])))"
with the logged in user test@huber.de I only see the child Max Meier.
When I change to the logged in user susi@schmidt.de I only see the child Lisa Test.
That's exactly what I want.
But the slice view for the timesheet table I have also build with a row filter condition like: AND((USEREMAIL() = [ChildID].[CareGiverEmail]), (ISBLANK([ChildID].[ExitDate])))
When I try to insert new values in the Timesheet view based on the data of the timesheet slice, I get all the children that are in the table, but I only want to see the child for the logged in user (based on the email address).
I hope I've explained clearly what I want exactly...
Here the structure of the second table called timesheet:
TimeID | ChildID | Date | Come1 | Go1 | TimeBlock2 | Come2 | Go2 | TimeBlock3 | Come3 | Go3 | DefaultDuration | Weekend | WeekendDuration | ToLate | ToLateDuration | CareGiverSick | CareGiverSickDuration | Breakfast | MorningSnack | Lunch | AfternoonSnack | Dinner | OvernightStay | OvernightStayDuration | Kilometer | Various | Remarks |
36d2eb85 | f5bc683c | 28.07.2023 | 06:45:00 | 21:20:00 | FALSE | 14,5 | FALSE | 0 | FALSE | 0 | FALSE | 0 | TRUE | TRUE | TRUE | TRUE | TRUE | FALSE | 0 | 15 |
And here are some screenshots from the views:
What is the problem, that I get all the children and not only the child what I need to see with the logged in user email address.
Thx for your help.
That's exactly what I need, but I need to implement the use the Drop-down on a Ref column... thx
User | Count |
---|---|
41 | |
25 | |
25 | |
16 | |
12 |