Hi @Dayne_Brizan
I think you want something that looks (a bit) like this:
https://www.appsheet.com/samples/Employee-timesheet-log-with-historical-calendar?appGuidString=37224834-68d2-4e1f-9cbe-773ce9df8c1e
I encourage you to have a look under the hood un order to get some ideas.
Basically, what you need is pretty similar to a basic restaurant app, for taking orders and details.
Here is a post where you will find an app that can be useful for you:
[Hi there, does anyone have a restaurant order...](https://community.appsheet.com/t/hi-there-does-anyone-have-a-restaurant-order/543/7) Questions
Hi @Komodowarno I have a basic demo app Food Orders 2 Which may give you some ideas. https://www.appsheet.com/portfolio/129805
Based on these, here is below my suggestions for your request.
Please keep in mind this is just a beginning, but that may help you:
Create a slice “Crew_ReadOnly”
To do so : go into Data/Slices/New Slice
Slice name “Crew_ReadOnly”
Source table “Crew”
Update mode “Read-Only”
Create a table “ChangeLog”
With columns:
- key, type text, initial value UNIQUEID()
- TimeStamp, type DateTime, initial value NOW()
- Vessel, type Ref, source table Vessel
- crew_getInVessel, type Yes_No
- any additional column you would want (user email…)
Create a table “CrewLog”
With columns:
- key
- changeLog, type Ref, source table ChangeLog, option Is a part of? ON
- crew_getInVessel, Editable : NO, Initial value expression [changeLog].[crew_getInVessel]
- vessel, type Ref, source table Vessel, Editable : NO, Initial value expression [changeLog].[Vessel]
- TimeStamp, type DateTime, Editable : NO, initial value [changeLog].[TimeStamp]
- crew, type Ref, Source table Crew_readOnly
Back to your Vessel Table
I suggest you create a virtual column and use FILTER(), SELECT(), COUNT() expression to count and extract informations you need.
For example, in order to get the crew for the last ChangeLog of a vessel, you will need:
LOOKUP(
MAX(
SELECT(
ChangeLog[_ROWNUMBER],
[_THISROW].[key] = [vessel]
)
),
"ChangeLog",
"_ROWNUMBER",
"key_changeLog"
)
then, the crew associated to this last “ChangeLog”
- “last_crew”
[last_changeLog].[related CrewLogs]
If you want to test if it was a onboarding or a landing
[last_changeLog].[crew_getInVessel]
For reference, a very useful article:
[FAQ: FILTER(), LOOKUP(), MAXROW(), MINROW(), REF_ROWS(), and SELECT()](https://community.appsheet.com/t/faq-filter-lookup-maxrow-minrow-ref-rows-and-select/24216) Tips & Tricks ?
Core concepts & functions Expressions: The Essentials FILTER() List Expressions and Aggregates LOOKUP() MAXROW() MINROW() REF_ROWS() SELECT() What is a Key? Adding & updating rows Is this a new row?/Does this row already exist? What is the previous value of this column? Excel alternatives How do I do COUNTIF() or COUNTIFS()? How do I do SUMIF() or SUMIFS()? How do I do VLOOKUP()? Last row of the spreadsheet How do I get the last row of the spreadsheet? How do I get a column value from…
for reference, useful documentation as well: