Check if every field has been filled in.
In my form I want to check if all fields are filled in and if so, set the value of a decision field (Info_compleet) to true. If there is any field that's empty, I want that Info_compleet to be set to false. Info_compleet, together with another decision field in the form (Productiestatus), should not be included in the check.
I managed to get this working the other way around using this code:
- if(input.Artikelnummer = null || input.Producent = null || input.Garantie = null || input.Productafbeelding = null || input.Sfeerafbeelding_1 = null || input.Sfeerafbeelding_2 = null || input.Sfeerafbeelding_3 = null || input.Beschrijving_ISAH = null || input.Beschrijving_productblad = null || input.Beschrijving_website = null || input.Armatuur_Hoogte = null || input.Armatuur_Breedte = null || input.Armatuur_Potmaat = null || input.Armatuur_Gewicht = null || input.Armatuur_Materiaal = null || input.Armatuur_Materiaal_onderstel = null || input.Armatuur_Materiaal_onderknoppen = null || input.Armatuur_Beglazing = null || input.Armatuur_Toepassing = null || input.Armatuur_Toepasbare_lichttechniek = null || input.Armatuur_eindkleur = null)
- {
- input.Info_compleet = false;
- }
- else
- {
- input.Info_compleet = true;
- }
I'm not the best at writing code, but I don't think this is the best way to do this.
I played around with getFieldNames() and removeElement to remove the two fields from the list, but I couldn't get that to work.
What would be the best way to do this?
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
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
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.