Oct 20, 2020 01:00 PM
If i have 2 tables one has rent of different location and in other if some one booked from to some location when from and to matches in both tables, in booking table give rent amount from rent table. Is it possible or any way to do this action and get result.
Oct 20, 2020 02:50 PM
I was a little confused by the wording of the question, but I think you have two tables: One table of bookings, and one table of Locations which can be booked.
I believe you should be able to link a Booking record to a Location record from the other table, and use a Lookup-type field to pull in that Location’s rent value into the Booking record.
Oct 20, 2020 02:55 PM
No @Kamille_Parks not location table rent table, this has 1 field for from and 1 field for to & 1 more field will be the rent from location to location of delivery ok & then when in booking table i have same 2 fields from and to some location then in third field it should give me the results from rent table when both fields matches the both fields of rent table. If you don’t understand i will give pic of example table.
Oct 20, 2020 02:59 PM
A picture example would be great.
If you’re trying to match records which have the same location and overlapping (or identical) start/end date time periods you may need a script (either the Scripting App or an Automation Script Action).
Oct 20, 2020 03:11 PM
Look @Kamille_Parks here in booking table rent field i need rent result from rent table field, when both tables from and to fields match
Oct 20, 2020 04:25 PM
Are all From -> To pairs going to be pre-defined in the Rent table? Should it be possible to set a From and a To in the Booking table that doesn’t exist in the Rent table?
If Bookings are supposed to be selected against the defined options in the Rent table you could link each Booking to a Rent record and turn the From, To, and Rent fields in Booking table into Lookup fields.
Oct 20, 2020 04:26 PM
If you don’t want your records linked together you’re going to need a script to search through matching records in the Rent table.
Oct 20, 2020 04:33 PM
Can anyone make me script for this?
Oct 20, 2020 05:00 PM
I wrote basicly the script you need in a few other topics, you can probably figure our what you need to do from these examples:
In that example, a filter is applied to find records that match based on one field, the value of that field is pulled into the variable “tag”. You’re matching on two fields. So instead of
return x.getCellValue("field name") == tag you would need to do
return x.getCellValue("field name") == tag & x.getCellValue("another field name") == variable2. Follow the instructions to create a new variable just like it but for the other field you’re matching to, and rename “tag” to “from” if you’d like (as long is you replace the name everywhere).
matchesFound.id should turn into
Oct 21, 2020 06:52 AM
I’m sorry i don’t know scripting can you make full scripting and send here then I’ll copy and paste please😑
Oct 21, 2020 07:29 AM
You don’t need to know scripting, I gave you links to scripts you can copy and paste and told you exactly what you’d need to change.