Help passing form data to function

Help passing form data to function

Hi

I'm new to functions and am struggling to understand how to pass arguments relating to forms/subforms. I have written the below function. This executes within the form Projects, which contains the subform Schedule, and each record in Schedule contains a field called Started.

bool Projects.CheckIfProjectStarted(Projects project)
{
count = 0;
for each  r in project.Schedule
{
if(r.Started = "Yes")
{
count = count + 1;
}
}
if(count > 0)
{
return true;
}
else
{
return false;
}
}

This function is called with the following script:

if (thisapp.Projects.CheckIfProjectStarted(ID) == false)
{
input.Project_Started = "No";
}
else 
{
input.Project_Started = "Yes";
}

However, attempting to save the second script (workflow) above gives this error message:

Error at line number: 1
Mismatch data type for function 'CheckIfProjectStarted' at argument index 1 expected data type Projects found data type BIGINT.

How do I correctly pass the current project ID number to the function? (Or do I need to change the way the workflow and function are communicating with each other in some other way?)

Sorry for the elemetary question and thanks in advance!

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly 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




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方