Push, append and merge operators not working as expected

Options

Hi all,

Just wanted to get your opinion on the following. Could also be that I am just misinterpreting on what I need to do, but can't find the rights docs for it.
So what I need to do it simple. An object has as field a list of timestamps (WhenLoaded). Every time the data is called, I wanna save the timestamp.
So I tried the push method (Exam.WhenLoaded Push Now), but that didn't work. Same for the Append or merge operator.

In the end I got it working with creating a variable, using the Array at to end method and then writing that variable again to the Exam. It works, but is very cumbersome in the flow. As wel as the fact that it keeps a null value as first element of the array.

So happy to hear if I am just doing it wrong or if it is a Xano quirk

Comments

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    Hi, Klaas! I'd probably have to see exactly how you had it set up to say for sure, but Push should be the answer for adding a new value to a list. When pushing to an object list, you want to make sure to push an entirely new object, but for just a basic value this isn't necessary and it sounds like that's what you were doing here.

  • Hi Chris,

    I just tried it again with the new post processing feature, which is ideal for this scenario, and it does seem to work now with append.
    However it still gives an error about types, any comments on that?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    The type error you're showing here can be ignored and is typically not indicative itself of any issue.