Record Fetching from Linked Form Based on Lookup Field Value Returns No Result

Record Fetching from Linked Form Based on Lookup Field Value Returns No Result

Form Menu_Master has Menu_Name field, which is looked up in Form Cafe_Order_Entry, in field Select_Menu, within a Sub Form.

Selecting a menu name from the drop-down (look up field) in form Cafe_Order_Entry, my goal is to fetch the corresponding Menu_Price field value from form Menu_Master. 

My code is this.
  1. if(Menu_Master[Menu_ID == input.Order_Details.Select_Menu].count() > 0)
  2. {
  3. fetched_Record = Menu_Master[Menu_ID == input.Order_Details.Select_Menu];
  4. alert fetched_Record.Menu_Price;
  5. alert input.Order_Details.Order_Quantity;
  6. input.Order_Details.Total_Price = input.Order_Details.Order_Quantity * fetched_Record.Menu_Price;
  7. }
  8. else
  9. {
  10. alert "No Match Found";
  11. }
I have written the If block to check the match occurrence, and I am getting the output from the Else block - "No Match Found", meaning that no match is found!

I had seen a line of code before where I didn't have to compare the ID field from the looked up form with the look up field value, and that worked too,  but I somehow lost that code, and can't find that again!

Any help here?

          Zoho Pagesense Resources

            Zoho SalesIQ Resources



                  Zoho TeamInbox Resources

                    Zoho DataPrep Resources



                      Zoho CRM Plus Resources

                        Zoho Books Resources


                          Zoho Subscriptions Resources

                            Zoho Desk Resources

                              Zoho Projects Resources


                                Zoho Sprints Resources


                                  Qntrl Resources


                                    Zoho Creator Resources


                                      Zoho WorkDrive Resources




                                          Zoho Campaigns Resources

                                            Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now


                                                      Zoho Show Resources