[Solved] Join two columns from airtable into a listviewer

I am sure I have seen this done many times but have searched to no avail.
I have two columns in airtable that I bring back into my app and want to place the values side by side in the list viewer. I know this will be simple but I just can’t see how! wasting so much time so thought I would ask!

listviewer

Hi, @Tina_Fountain! :wave:

Try these blocks -

After everything, set the x variable to the list viewer.

Thanks! :blush:

1 Like

Thanks for help, however I want to concatenate the name and the points rather than have them following on.so each item in the list would have the persons name and the corresponding points side by side I did try creating 3 new lists one for each column and then a 3rd for joining them together via a loop. but no joy!

Create var x, y, z (empty list)

Step 1 putting the first column into var x

Next. Put second column into var y

Last in a loop that lasts while length of x is greater than 0, in list z add last as (join with text block) insert last as( get and remove first from list[x] )with get and remove first from list y

1 Like

Thanks again. this is what I have but nothing now displays. I have tried a couple of ways but missing something!

I’ll make a sample for you shortly. Gotta put my kids to bed for now :older_man:

see screen4, it should be the first that loads.

https://x.thunkable.com/copy/849697b7e276cfba6ad74782afb44a07

I only added a delay in the loop for the visual effect. you can ‘watch the app’ join and display text instead of it all happening too fast to see :slight_smile:

1 Like

Fantastic. and it makes sense now I have seen it, totally missed the get and remove option.

thanks for your help I will pay it forward!

2 Likes

@jared Incredible Solution! :+1:

BTW, the get and remove block seems new; Is it?

Thanks! :blush:

1 Like

@kartik14, I learned about that block when I made my first random shuffled study app. Using this block + the shuffle list block, I can shuffle a list of questions on screen open, and then work my way through one by one until all questions have been seen once.

This way you don’t have to use an incrementing variable to work your way through a list of items if you plan to use them all.

2 Likes

Oh :sweat_smile:

I missed that useful block :joy:

Thanks, @jgibb20189! :blush:

1 Like

Hi Jared,

I am new to thunkable and I saw that you help a lot to the users. So thanks a lot.

I take the chance to ask something related to this post that I did not see anywhere. Do you know if it is possible to do the same with something similar to your example but separating the lists in two columns? I mean the “1,11”, “2, 12” , … that you have but
“1” “11”
“2” “12”
“3” “13”
and so on? and, would it be possible to add pictures instead of “1”, “2”, “3”?.

Thanks in advance!

1 Like

I learnt how you join two list together in this example. Thanks for that. (app_list3 = app_list1 + app_list2)

Now i have another question.
Can you please teach me how to separate app_list3 into app_list1 and app_list2. (app_list1 + app_list2 = app_list3)

Thank you

List = [ “1,11”, “2, 12”, “3,13”]

foreach i in List{
pair = get[i].split(",");
pair[0] - for first list
pair[1] - for second list
}

Can you please show how to do this in blocks. Thank you

@actech

To do this, I suggest that you study the blocks for working with the list by reference.

http://droidscript.ru/main/statyi/thunkableios_blockhelper.php

PS

Please create a new topic for each new question.

1 Like