(Untitled)

Options
Hey everyone, hope you're doing well. I'm having an issue. [Image] I'm comparing my user name and the input name both filtered with a split(' ').join('') to remove all whitespaces. When I'm doing that directly with the values, the condition doesn't pass. But when I store them in variables, I have the result.
My user:[Image]My input:[Image]Run & Debug result:[Image]
Thank you in advance. Have a good day👍

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Hi! What's the problem you are having? If the intent is for the test to pass when "A B C" matches "AB C", that's what you have - or so it seems. Is there an issue blocking you?
  • Leo Med
    Leo Med Member
    Options
    Hey , thanks for the answer. The problem is that for a condition a = b, it doesn't pass when a and b are directly used as instances of the user record(in my example: var:user.name|+2 filters=input:name|+2 filters) but it passes when a and b are variables that store the record instances (in my example: 
    • Create Variable: input:name|+2 filters as var_1
    • Create Variable: var:user.name|+2 filters as var_2
    • Precondition: var:var_1=var:var_2  -> true)

    Filters are the same in both cases
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    it sounds like you have a solution in the form of putting them in variables. Is there a reason the inline filter based approach is a requirement?
  • Leo Med
    Leo Med Member
    Options
    , this is not a requirement now but I have to know if there is something i'm doing wrong cause it is supposed to work. I've started using Xano like just a week ago and it will surely become my favorite tech for backend. Don't really want to be creating variables everywhere... hope you understand my point