


I have a scenario that takes 3 typeahead fields and parses them into an array where I then add them as assignees on a created task. The three typeahead fields are:
DE: D2D Account Lead - Creative.
DE: D2D Account Lead - Digital.
DE:HCG EG Strategic Steward.
If the company I'm pulling from has all 3 filled out, everything works fine. If there are any blank fields I get a "Source is not valid JSON." error. I don't know what kind of error handling I can use to go ahead and create the array with only 2 entries. Screenshots below.
I could just add a service account to all un-staffed typeahead fields but that's a hack. Is there a right way to handle this error?
Views
Replies
Sign in to like this content
Total Likes
Well, here it is. It's big, it's messy but it works. Setup dialog is on top, result dialog is below. I can't help but think there's a better way with less steps but for now, it works.
Views
Replies
Sign in to like this content
Total Likes
Hey Randy - I don't know that it's any better than the hack you describe, but the idea I keep coming back to is to build it out with different branches (or maybe an array) that then is used to build the resulting JSON. I think that will allow it to be built with just the relevant 1 or 2 responses.
From an error handler approach, would putting a router as the first time in the error handler to branch off based on what fields have a value and then rebuild work?
Thanks Jason, I figured it out and it looks messy and repetitive but no one will see the scenario but me anyway. At least it works!
I'm documenting it today so I'll post the breakdown of how it works so maybe others can benefit (or maybe even critique it and help find some efficiencies).
Views
Replies
Sign in to like this content
Total Likes
Well, here it is. It's big, it's messy but it works. Setup dialog is on top, result dialog is below. I can't help but think there's a better way with less steps but for now, it works.
Views
Replies
Sign in to like this content
Total Likes