Data selector data is different from query output

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)

I want the Trigger for the dialogue to have dynamic text based on the query output.
When I review the query in Page data the values that are fetched are correct:

But Data picker is convinced that the value of that field is 1 for all records:

What have you tried so far? (please link relevant docs and other forum posts)
I tried refreshing everything but to no avail. All other entries from the query are shown correctly

Relevant links:

1 Like

Update: I have created another Num column in the DB table (I am using Supabase) and added it to the query. The column should be exactly the same for all intents and purposes, but it is read correctly by the Data Picker, has a different icon next to it and allows mathematical operations over it (so not regarded as text by Plasmic Studio).

I do not understand why Data picker sees these two columns as of different type (to reiterate the query wizard in Page settings reads data correctly, it is only the data picker where things break down). It bothers me because the old column b_timeline used to work just fine with Data Picker and then all of a sudden started returning an unexpected value. I’d like to make sure it doesn’t happen with other components in my project.

New column

Hello @alexander_eliseev, I am unable to reproduce this issue in your project, as I am able to see the different values of b_timeline in the Data Picker dialog. Are you still experiencing this issue?

@sarah_ahmed I believe I have found the underlying reason and it is a… frustrating one :slight_smile: One of the text elements on the page had a dynamic value defined by this line:

(currentItem.b_timeline = 1) ? 1 day

instead of

(currentItem.b_timeline == 1) ? 1 day

I think this led to the component messing everything up whenever the dynamic value was refreshed.

But I am just guessing. Could this be the underlying reason?

Oh, this seems to be the underlying issue, because the first code snippet uses an assignment operator (=). Did you try the correction?

I did and it seems to work so far! Is there a way I could undo the changes if any piece of the code does this again? Or is it enough to simply delete the offending line and refresh the page?

It should be enough to just delete the line and refresh

1 Like