New mapping Dropdown from a listView component

I am loving the new mapping version of the Dropdown component as I am hoping that it will allow me to do something much more efficiently. I am trying to select which options are available according to the value on a listView from which it is selected.

However, I think there is a conflict between the special value of [i] for the listview item or the dropdown item?

Can anyone help please?

I am trying to put this in the Hidden field of the dropdown component.

{{ item.Object_ID == number_component[i].value }} (Where [i] is the index for the listView)

is there a way to distinguish between the i's? Or some other way around this?

Jeremy

Hi @jclutterbuck Thanks for reaching out! Would you mind sharing a screenshot of your setup? I think that would help me better understand your use case.

In the meantime, I'm wondering if you need to be referencing the component's value from within the listview's .data property?

Versus:

@Tess, thanks for your reply.

I don't think the .data has what I need?

Here is a screenshot.

I have a new style dropdown on my listView. Each row of the listView is a different object.
The dropdown has a list of statusses. Different objects have different statusses. (I have been rerunning the query for the dropdown, on the Focus event, so that the list of valid statusses is right for that object = quite slow!).

I am hoping that I can hide the statusses that are not valid for that object using the Hidden mapping?

The data structure from the query has the StatusID (value), [Status name] (label), [Object ID] (which object is this a valid status for).

The ObjectID is on the listView row as a hidden number component (ThisObjectID) (on the far left). But to reference it I need to use ThisObjectID[i], and I think this is where the confusion starts. If I use item.Object_ID != parseInt(ThisObjectID[i].value) in the Hidden mapping, I don't get the results I am expecting. Is there some other way of accessing the listView index? or some other way of solving this problem? Other than going back to requerying on every Focus event?

I am excited for this because it could also save similar problems with other dropdowns.

Regards

Jeremy

Hey @jclutterbuck

Thanks for this walkthrough! I see what you mean.

I am not currently finding a good way to do this via the hidden field, but it does appear to work if you dynamically filter the data source.

In the below example, I am filtering the data going into the select component based on that particular listview row's data. Since the select component is already filtered dynamically, I don't have to hide any values

Okay, thanks. This looks like an interesting alternative. I'll give it a go.

Jeremy