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 Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • 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