Hi
I have tried following other posts about auto filling fields but cannot seem to get it working, here's my set-up:
Main form: quote_system
Sub form: areas
Price list form: master_price_list
In the sub form, users will fill out rows of data completing a quote, they start by selecting an area (which populates from a lookup field), based on this selection a new lookup field gives them a type from the master_parts_list which in turn gives another dropdown with possible parts (again from the master_parts_list).
What I then want to happen is the price of that part is automatically filled in to another field in the sub form (areas). The user could then change the value to help increase/decrease the overall quote. But I cannot get this cost field to auto populate.
I have added the following script to the sub form > part field so once that is selected it should fill in the price:
if((count(master_price_list[Part_name == input.Part]) > 0))
{
temp = master_price_list[Part_name == input.Part];
input.Cost = temp.Material_cost;
}
Cost is a blank field I have in the sub form where I expect the price to be filled in, but nothing happens?! Could there be a problem as its a sub form being completed within a main form?
Can anyone help?
Thanks