Why isn't my selected list(from listpicker) not turning to dictionary({})

Hello,(this is my first time asking for help here)
The app is an API Client(like postman)
and it can get and post(with body(in json)) data
since there are more content-types I created a list picker that has the content-types the user can pick
the variable(Contents) that holds a nested-list which has 4 lists inside it is the content-types
variable:

I created the list this way so it can be turned into a dict when needed

I also created a variable for the choice selection
variable:
image

This variable(dict) is there to hold the changed data(the one changed from list to dict) from and it holds a default value
variable:

also here is the block that change the list to dict

now when the app runs,
is where I get the error(below)
when I click the listpicker and it displays the Contents like this (Content-Type application/json) after that I click my choice the following error occurs
can anyone tell me why this happens?

runtime error:

app:

Because the listview contents is no longer a list.

Use selectionIndex of the listview to return the correct item in the list Contents.

ok, so I should use the SelectionIndex property to get the item so I should use the Select List Item block to get the item from the Contents and then convert is This correct?

also When I did that I got this


Here is the thing I changed:

Try like this:

( /s get escaped....)

1 Like

still getting the same error the second one

Post a test aia here that shows the problem

I am not quite sure I understand

Export aia and upload here so someone can check it. Also do you test on Android or IOS?

I am testing it on an android phone

1 Like

Also I think I found a solution @dora_paz and @TIMAI2
I just added a create list block and it works

1 Like

ummmm....

1 Like

oh...
looks I didn't see the make a list block in that one sorry :slight_smile:

Also Thanks Everyone @TIMAI2 @dora_paz

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.