we are currently in the process of developing a custom preference centre via cloud pages. In one of the tabs we ask users for region/travel preferences. We have 6 checkboxes corresponding to 6 regions.
We will restrict the submissions to 3 options via the UX. We are saving these values both in Marketing Cloud via a boolean field for the selected regions and in Salesforce Cloud via 3 text area fields.
What's the best way to write the if/else clauses to consider this scenario (get the 3 values of 6) without getting tangled in the ifs? I was thinking if there is a way of ''grouping'' these values in batches of 2?
I have decided to apply a corresponding ''text label'' to the selected boolean value of True which I will then use when I update the Salesforce object where we store these preferences:
IF (@PlacesEurope == 'True') THEN SET @RegionUnu='Europe & Britain' ELSE ENDIF IF (@PlacesSouthAmerica == 'True') THEN SET @RegionDoi='South America' ELSE ENDIF IF (@PlacesNorthCentralAmerica == 'True') THEN SET @RegionTrei='North & Central America' ELSE ENDIF IF (@PlacesAfricaMiddleEast == 'True') THEN SET @RegionPatru='Africa & The middle East' ELSE ENDIF IF (@PlacesAUSNZ == 'True') THEN SET @RegionCinci='Australia & New Zeeland' ELSE ENDIF IF (@PlacesAsia == 'True') THEN SET @RegionSase='Asia' ELSE ENDIF
I have attached a snippet of the UX.
Any guidance is much appreciated!