table data referenced in the same table

Hi guys,
I have an office visit registration app, in it the person enters her name and address with her identification through OCR,
Their phone number, whatsapp and email are entered manually, they indicate the process from a drop-down list.

I want to know if it is possible for this form to make a reference to the personal data registered, for example:
When you enter your name, your registered data such as address, phone number, whatsapp and email come out automatically and from the same table and you only have to select your process from the drop-down list.

it's possible? Is there a conditional formula or something that allows it?

I want that in case your data is not registered in this same table, the telephone, whatsapp, email and address columns are shown to enter data and if they are already registered, the registered data is shown.

I hope you can help me and thank you.

Solved Solved
1 8 137
1 ACCEPTED SOLUTION

Replace "Nombre" with [Nombre]. it will took the column value or [_ThisRow].[Nombre]

View solution in original post

8 REPLIES 8

 You can't  ref to the same table but you can use the the lookup formula as a initial value. You can also set [Name]<>"" as a show if condition to the email adress, phone number exc...

Example: lookup([Name],"TheNameOfYourTabe","Name","Adres") .

 


@Ceke wrote:

 You can't  ref to the same table


Yes, you can have a table column as a Ref back to itself.

 


@rikinitro wrote:

When you enter your name, your registered data such as address, phone number, whatsapp and email come out automatically


EDITED:  updated to clarify certain comments.

I don't think you want to use name as your lookup.  There is a good chance that for many names there could be multiple registration rows.  Instead I recommend using email address as the field a user provides.

Once the email address is entered then you can use the LOOKUP() function, as mentioned by @Ceke, to retrieve the row reference.

However, doing this in a single Form most likely will not work.  When you open a Form, it has a mode to it - NEW or EDIT.  When its new, if you fill all of the fields, including the row ID of the existing row, and then attempt to Save, AppSheet will give an error that the row already exists.  Instead a user would need to Cancel out of the Form - not really good user experience.

I would suggest to have a 2-step approach.  First, a very basic Lookup Form with just a field to enter the email address.  This Form checks if the row exists or not.  If it exists, then you go to a view, maybe the Detail view to see the registration info.   If it doesn't exist, then the user is taken to a Registration Form, with the email address already filled in, requiring all of the other additional registration info to be completed.

 

The lookup does'nt gives you a list it take just the first result associated to the value that you are searcing. so if previously there is a match il will fulfill the column adress or else otherwise it will leave the form blank. 

I extract the name from another column since I use OCR to get the data as the name.
I made this expression for the "whatsapp" column so that as soon as the name that was previously registered with the whatsapp number appears, it is also shown in this column, "only if it was previously registered"

LOOKUP("NOMBRE","ASEGURADOSRECEP","NOMBRE","WHATSAPP")

 but it does not extract the data already registered, that column does not appear

column.PNGexpresion.PNG

Replace "Nombre" with [Nombre]. it will took the column value or [_ThisRow].[Nombre]

I give up! now it does show the data but if I want to make a new record the whatsapp column does not appear when registering

I think it is because you had set the app formula instead of the initial value in the column.. the difference between app formula and initial value is that

appformula depends of the formula you setting in and it doesn't allow you to change its value manually

Initial value is like a suggestion the app makes you based on the formula you set in but it allows you to change it, after you try to write in it doesn't work anymore as a data changer.

 

 

Top Labels in this Space