Can I use a reference in this situation?

Hi everyone,

I am creating an app that allows me to certify people for work.
I have a view that displays all of the users, along with all of the jobs they are certified or not certified to complete.
I have another form view that allows me to ask them questions and input their responses.

I would like to link these up. So if a row has been input on job 1 in which user x has passed it will show up as passed on the main view.
In the other direction I want to be able to go to a user on the main display and use an inline action to send me straight to the job form with the name prefilled.

I imagine I can do this using references but I am unfamiliar with exactly how these work.

0 7 499
7 REPLIES 7

This needs a little clarification. Some images of your views might help.

What does โ€œinput on job 1โ€ mean?

Can you elaborate on what โ€œuser x has passed itโ€ means? How does the user pass? Where is this pass/fail decidedโ€ฆin the form? Is the form data in a different table?

Sorry @WillowMobileSystems

I have a list of users as you can see in the first image.


Each user has a yes or no for each job they are certified able to complete.
If I complete the certification form for that user I want it to be marked as certified on the user view.
I believe I have this largely working now. In the pictures you can see the reference listed below the users details.

Is it possible to remove this and just have a link to that users passed form next to the related job.
For instance I have a job labelled Artic, user Bob for example has just completed his certification. I would now like to see on Bobs detail view has Artic marked as completed and by clicking on that โ€œCompletedโ€ text I am shown his completed form.
This sounds very complex but I am sure itโ€™s basic level appsheet work.

These warning indicators need to be fixed (assuming itโ€™s not something you yourself have added):

2X_1_1e8b90d4196b0f76aa3fc862f80754c549d85956.png

The yellow triangle typically means the column is of type Ref but the value does not match a key column value in the referenced table.

Ok got it! With the images it is much more clear and it is fairly basic as you mention. Was just hard to visualize from a text description.

First things first, like @Steve mentions, you need to correct the Ref column that is pulling in the Employee names. You do this by making sure the VALUE stored for each row is the KEY column in the table you are referencing. You can still show the Names by setting the Name column as the LABEL for that table. AppSheet will automatically translate the KEY value into the LABEL value for display.

Secondly, youโ€™ll need to decide how you will be reflecting the Pass/Fail results in the Users view. As you have already noticed, Yes/No columns do not show the column headings. I would recommend setting each column for the different Certifications as Text and then assign values like โ€œPassโ€ or โ€œFailโ€ or blank if not yet completed.

Once you have the two things above settled, then you can link to your Form Certification results. Iโ€™ll assume you are saving these results to a different table named โ€œCertificationsโ€, you have an โ€œEmployeeโ€ column and you have a result column named โ€œPass?โ€ defined as a Yes/No column with โ€œYesโ€ for Pass and โ€œNoโ€ for Fail. If so, then you can set the App Formula for each column like this:

SWITCH( 
       LOOKUP([_THISROW].[Employee], "Certifications", "Employee", "Pass?"),
       "Yes", "Pass",
       "No", "Fail",.
       ""
)

I hope I am on the right track here and this helps. @Steve please chime in if I have mis-represented anything!

@WillowMobileSystems

Thank you for your very detailed response!

So the structure of my app is a little bit different to your interpretation but thatโ€™s fine.
Iโ€™ve got it mostly working (Not giving errors haha), the issue im running into right now is with the expression:

SWITCH(
โ€ฆOne randomly chosen value from this list (
โ€ฆThe list of values of column โ€˜Passed?โ€™
โ€ฆfrom rows of table โ€˜Articโ€™
โ€ฆwhere this condition is true: ((The value of column โ€˜Operatorsโ€™) is equal to (The value of โ€˜Operatorโ€™ from the row referenced by โ€˜Operatorโ€™)))
โ€ฆโ€œYesโ€
โ€ฆโ€œPassโ€
โ€ฆโ€œNoโ€
โ€ฆโ€œFailโ€
โ€ฆ"")

The result of this is that the column shows the text in that cell (As though theres no formula for the column and its a simple text column). I feel like the result means it is looking up the wrong table but it cant be because its not producing errors and the Operators table does not have a [passed?] column

Hmm, It works perfectlyโ€ฆ If I put the formula in a virtual columnโ€ฆ why is this?

What is the formula you ended up with? What issue do you have if you try to use it in a normal column?

Honestly, if you do not need to save the Pass/Fail value in the โ€œmainโ€ view for any reason, then Virtual Columns might be the better choice anyway.

Top Labels in this Space