using the lookup field

72 views
Skip to first unread message

grahamsc...@gmail.com

unread,
Jan 22, 2023, 7:50:15 PM1/22/23
to mementodatabase
I have a database with 2 libraries

Libray 1= Holidays
Library 2= Travel locations

In Holidays I have a lookup field (Bookings) that is totalling up accomodations costs (from Travel Locations)
Is it possible to add the field bookings to a field called flights (located within Holidays library
eg
Bookings =1000
Flights = 1500

if I add them together like this
#{Bookings}+#{Flights}
I get an error "expression is invalid" . I have searched the help section of Memento but cant find anything on doing this.

I suspect I am approaching this in an incorrect way, so my question is what is the correct way to approact this simple calculation

grahamsc...@gmail.com

unread,
Jan 22, 2023, 8:04:44 PM1/22/23
to mementodatabase

for some reason after re entering the fields and restarting the DB it is now working as intended.  As mentioned if this is the incorrect way to approach this calculation it would be great to hear some views on it.
Thanks

Bill Crews

unread,
Jan 22, 2023, 8:08:53 PM1/22/23
to grahamsc...@gmail.com, mementodatabase
I don't know much about Calculation fields, but it seems like the JavaScript field would also work. The script would be...

field("Bookings") + field("Flights");  // Pretty simple


--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/eccd2c40-8a1b-4987-b77e-4af70722a11bn%40googlegroups.com.

grahamsc...@gmail.com

unread,
Jan 22, 2023, 10:16:10 PM1/22/23
to mementodatabase
Thanks Bill, I did try that first off and it gave errorsso I switched to the lookup field but Im suspecting I have a field named the same somehwere and giving a confliction because using javascript or a simple calculation I seem to get errors untill I shut the DB down and re open it seems to work.
I will hunt down the issue. Thanks again for your very quick respoonses and the help you offer. Its much appreciated

Er Mo

unread,
Jan 23, 2023, 2:51:03 PM1/23/23
to mementodatabase
Hallo
Welchen Feldtyp verwendest du ? Wir Reden hir über " Berechnungsfelder " . Die Schreibweise um den Wert von einen Feld zuerhalten ist bei den Feldtypen verschieden .

Hi
What field type are you using? We're talking about "calculation fields" here. The notation used to get the value of a field is different for the field types.

Ernst
Reply all
Reply to author
Forward
0 new messages