Fetch record Issue

Fetch record Issue

Having trouble fetching a record.

In Short:

I have 

Form 1 - Material Type
      Field - Material_Type
      Field - Material_Type_Code

Form 2 - Material 0.2
      Field - Material_Type - (Look up to form 1)
      In-Line Sub Form - Material in 
      in-Line Sub Form - Material out
      Field - Available - Calc of ((Material in*n) - (Material out*n))
     
Form 3 - Order Tickets
      Field - Material_Type (Look up to Form 1)
      Field - Available - (Material available from form 2)
      some calculation fields to see how much material the order will use 
      Field Remaining - Calculation of (material used - Available)

My Issue is on Form 3 i can not get the "Available" Field to populate. 

the code im trying to use to fetch the info is:

 x  =  form 2   [ID == input.Material_Type];
alert(x);
z = x.Available;
alert(z);

The alert X box brings up every id number from that form not just the one selected in the look up field, causing the z variable to be null .....am i just missing a step ?

Mike 

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts



                                                            • Sticky Posts

                                                            • Celebrating our Zoho Community SuperBuds!

                                                              The SuperBud program recognizes the efforts Zoho users  put in to help the rest of the community thrive and grow in their individual Zoho journeys. Be it the ZUG meetups  or these forums, several Zoho users including our MVPs andZUG leaders, have stepped


                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner









                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方