Question

Null values in line itemizer

  • 20 January 2023
  • 8 replies
  • 144 views

  • Anonymous
  • 0 replies

Hi!

I’m getting from a API response this information as a comma delimited list:

  • Name: A

 

  • Name: B
  • FirstIn: 20-01-23

Note that the first one does not have a FirstIn value, since it hasn’t yet logged in

 

The exact format would be this:

  • Output Name:{“A”,”B”}
  • Output FirstIn: {“”,”20-01-23”}

 

If I pass both variables to Line Itemizer, I’ll get this:

  • Name: A
  • FirstIn: 20-01-23

 

  • Name: B
  • Output Name:[“A”,”B”]
  • Output FirstIn: [”20-01-23”]

 

Because it ignores null values and mixes them up. I see it interprets the output of FirstIn for B as null, but the null should be imputed for A.

I need to parse both variables (Name and FirstIn) as line items because I’ll be using them in a SpreadSheet-Style Formula in next steps

How would you solve this?

 

Thanks in advance!


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Userlevel 7
Badge +14

Hi @GPozzi 

Good question.

For clarity and context, please post detailed screenshots with how your Zap step are configured, thanks.

Hi @Troy Tessalone ! Thanks for taking the time to look at my issue. This is the API response of Employee A:

 

This is the line itemizer. Employee A hasn’t got a FirstIn date and thus its FirstIn is null

 

But the output shows Employee A has the timestamp of Employee B, confirming the shuffling:

I hope the mix in the variable names does not confuse you

Userlevel 7
Badge +14

@GPozzi 

How are you trying to use the output of the Formatter step?

 

Perhaps try using the Looping app to handle each line item: https://zapier.com/apps/looping/integrations

 

Code steps can also be used to handle line items more robustly: https://zapier.com/apps/code/help

I’m trying to use it this way with formatter - Event:numbers - Transform: Spreadsheet-Style Formula:

See how it mixed them up. The first name is A and the second is B

 

The result should be a concatenation of “Ausente (absent) NAME” or “Presente (present) NAME” if FirstIn is null or not

 

Yes, I’ve tried using code but I can’t itemize properly...

Userlevel 7
Badge +14

@GPozzi

But what are you trying to do with the output of this Zap?

 

 

 

The point of this zap is to message in real time via Google Chat the list of absent students at 9:00 by comparing a list of students that should have checked in (which I take from a GSheet with another step) with a list of students that have effectively checked in (the output of the first step, which is the result of an API call).

By appending the text (“Presente” / “Ausente”) to the spreadsheet text formula I’ll be able to filter out the absent ones in a subsequent javascript code step and also filter the name that contains the students that should have checked in in that shift.

Again, thanks for having taken a look at my question 😁. I appreciate it

Userlevel 7
Badge +14

@GPozzi

If you are using a JavaScript Code step already, then why not handle the logic in the Code step instead of trying to use Formatter steps?

 

I think it would be helpful to see a screenshots that shows all of your Zap steps outline in order for us to have enough context.

Userlevel 7
Badge +11

Hey @GPozzi!

I just wanted to check in with you on this to see if you’d had a chance to consider what Troy had said above? Or maybe you’ve managed to solve this some other way?

Please let us know if you still need help here :)