Hello,
I have a question about the insert into function.
I have three forms:
Form A: containing the fields: Name, group and Number ;
Form B: containing the field: Name, group and Number and Message;
Form C (blanco form): Containing the field Group and Message;
When I select the blanco form I have made a submit button with has to do the following action:
Based on the selected group, it has to search in Form A who is in the selected group.
It has to input the users who are in the group into form B.
I have made the following script:
- Meldingensubform = (Employee_s_Sales[Groups = input.Groups].ID).getall();
- cnt = 0;
- for each employee in Employee_s_Sales [Groups = input.Groups]
- {
- if (cnt < Meldingensubform.size())
- {
- ProductID = Meldingensubform.get(cnt);
- Meld = Employee_s_Sales [ID == ProductID];
-
- insert into Send_Page_Sales
- [
- Added_User = zoho.loginuser
- Custom_Message = input.Custom_Message
- Mobile = (Meld.Mobile)
- Quick_Message = input.Quick_Message
- ]
- }
- }
It does create the right amount of matching rules. But I doesn't fills in the right values based on the form A.
So It repeats the number and the name. How can I make sure it puts in the right amount of records with the right number and name?
Really hope to hear from someone soon.
Greatings,
Erwin