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.
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.
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).
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.
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).
Lastly matchesFound.id should turn into matchesFound.getCellValue("Rent")