Extract

Is there a way to extract a phone number from a table and put it into another row of a different table?

If so is there a way to do this for multiple rows at the same time?

I have attached images that try to convey what I mean.

The end goal would be to extract the phone numbers in a list that corresponds to the specific contact ID of the row that it’s in

Hi @Fre3

You can have this expression (not tested):

https://help.appsheet.com/en/articles/3497843-extract

I would try:

EXTRACT("PHONENUMBERS",ANY([Related tbl_contact_detailss][title]))

Edit: Correction to expression

1 Like

I tried putting this into the contact numbers row expression and got this back

This was an assumption about the column name that refers to the other table.

It should be something like this:

Aurelien_0-1649930592465.png

Please note I corrected my post, as I entered the arguments in the wrong order.

1 Like

Ref_RowsEXTRACT(“PHONENUMBERS”,ANY([Related tbl_contact_details][title]))#

Do you mean like this?

It didn’t work either, am I supposed to set the contact numbers type to list even though I want it to extract each of the numbers from a row in another table?

I also tried the expression you changed and it still comes up with

Unable to find column ‘Related tbl_contact_details’

@Aurelien

can you share your table structure ? with a screenshot from the app editor

1 Like


g

The green highlight is where I want the contacts numbers from the “title” column in the 2nd image to go

Based on my analyzation of your screenshots, here’s what I can imagine with the table structure

Contacts
------TBL_CONTACT_DETAILS
-----------TBL_PRICES

If you want to extract the phone numbers then your formula for Contact Number in the TBL prices should be [ReferenceKey].[Title]

I put that into the reference expression and it came back with

Unable to find column ‘ReferenceKey’

Check what is the column name that has Ref type in your TBL_PRICES that targets TBL_CONTACT_DETAILS and change the ‘ReferenceKey’

1 Like

Do you have an example so I can get it right please?

@Fre3

I just noticed something that may cause an issue in your table structure.

You have 2 tables with contact ID as key_column.

That should not happen.

“key” columns are the “key-concept” of AppSheet :rofl:

You may want to have a look here, it may help you to see things a little clearer:

https://help.appsheet.com/en/articles/1023086-what-is-a-key

https://help.appsheet.com/en/articles/961426-references-between-tables

https://help.appsheet.com/en/articles/1090811-dereference-expressions

1 Like

Should this be changed then, if so what should I do. I will look at the articles and see if I can figure it out also

Please pay attention to what you are writting:

SkrOYC_0-1649951029638.png

SkrOYC_1-1649951045709.png

Read the docs, that’s the biggest solution

REF_ROWS() | AppSheet Help Center

EXTRACT() | AppSheet Help Center

1 Like

Does it work for every single row, bearing in mind I want my list to go down with each persons corresponding number

Okay, I want to return the value of a specific row, but i want every specific value from each row to go into a new row. Not just be extracted over