Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.

How to prefill form from the same table

Hello, im using the "IC NUMBER" as an uniqueID for my registration form 

When we entered the already registered IC NUMBER it will reject the registration which is how it should work,

Can we auto prefill the form if we enter the already registered IC NUMBER? the data source will be from the same table and not from REF table.

MyMaharani App.png

Solved Solved
0 6 292
1 ACCEPTED SOLUTION

One approach might be to have the user start by completing a small form where only the IC number is input.  (This should probably be stored as a separate table.)  A custom Go To View action could be assigned as the form save action, and an if statement in the trigger view field to check whether the IC number exists.  If it does exist, use LINKTOFORM to prefill the new full registration with values from the existing record.  If it doesn't exist, navigate the user to a registration form with only the IC number pre-populated.  

View solution in original post

6 REPLIES 6

One approach might be to have the user start by completing a small form where only the IC number is input.  (This should probably be stored as a separate table.)  A custom Go To View action could be assigned as the form save action, and an if statement in the trigger view field to check whether the IC number exists.  If it does exist, use LINKTOFORM to prefill the new full registration with values from the existing record.  If it doesn't exist, navigate the user to a registration form with only the IC number pre-populated.  

@RedVox Thanks RedVox for the suggestion. Thats a great way also to do that i guess.

 

Im a newbie & I do have the idea to make a custom Go To View, but how actually we set it up so that:

1- Matched the IC number --> go to View of the registered ID

2- No Matched IC Number --> go to new registration Form with prepopulated IC number 

Can 1 action behaviour has 2 rules? for the matched & no matched IC number? And whats the way to do that ya. 

 

Thanks a lot for the suggestion

The behaviour for both cases can happen within one action, and the view will be the same regardless of the condition.  Only the number of fields prepopulated will change.  

So, within a Go To App View action, your decision as to which fields to prepopulate will be part of the Target formula.

It will basically be something like this:

if( In[IC Number Entered], "Registration table", "IC Number"), 
       LinkToForm("Registration table_form", "Nana", Lookup([IC Number Entered], "Registration Table", "IC Number", "Nana"),
       LinkToForm("Registration table_form", "IC Number", [IC Number Entered])
)

The if statement tests whether the IC number is found in your registration table.  If it is found, then any values from that registration can be obtained with Lookup() and added to the value pairs attached to the LinktoView() function.  If the registration number is not found then the only value we can prepopulate is the registration number, in the negative case, we include that as a value to prepopulate.  

Cheers!

I'm sorry im trying to figure out were to put which but unable to understand few area to change

My registration table named: PATIENT 

So basically the formula should be like this? 

if(In[IC NUMBER], "PATIENT", "IC NUMBER"),
LinkToForm("PATIENT_form", "NAMA", Lookup([IC NUMBER], "PATIENT", "IC NUMBER", "NAMA"),
LinkToForm("PATIENT_form", "IC NUMBER", [IC NUMBER])
)

I tried to enter the above formula into the target part of ACTIONS but it cannot be use. It turns out invalid. Should i remove the word IC NUMBER Entered or just leave it?  Or problem on other area? 

Im sorry i dont know much about the whole formula thing. Thanks

The formula I gave was just a starting point for you. You’ll need to put
in the real field names and may have some other tweaking to do. That’s all
the help I can give you.

Ok sir, thanks a lot for the help. I do have an idea how to do it. Will do more research thanks! 🙂

Top Labels in this Space