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.
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.
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.
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).
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
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.
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.
Can anyone make me script for this?
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
I’m sorry i don’t know scripting can you make full scripting and send here then I’ll copy and paste please😑
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.
This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.