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.
- if(Menu_Master[Menu_ID == input.Order_Details.Select_Menu].count() > 0)
- {
- fetched_Record = Menu_Master[Menu_ID == input.Order_Details.Select_Menu];
- alert fetched_Record.Menu_Price;
- alert input.Order_Details.Order_Quantity;
- input.Order_Details.Total_Price = input.Order_Details.Order_Quantity * fetched_Record.Menu_Price;
- }
- else
- {
- alert "No Match Found";
- }
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 SalesIQ Resources
Zoho Pagesense 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
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.