Table Display Label instead of Key

I think i have asked this before, but perhaps buried inside another question. figured I'd make a top level question to get some clarification.

When we last left our hero, he was working on an internal application to make for more efficient hospital rounding for providers at our clinics. The app currently has two relatively simple views, one with All Patients, and another with patients flagged as "In Hospital," with that view being the primary one that the providers work with. We deal with patients at multiple hospitals, and at the moment, I have patients grouped based on the hospital so for example all patients at WTH-J are grouped, WTH-D are grouped, and so on.

What I want to accomplish is to change the In Hospital view to be tabbed so the provider can easily select which hospital he or she is working that day without having to scroll down a list of patients they are not going to see today.

I figure I can do this with a Dashboard view to combine new views made from Slices.

I tried creating a slice today to test, and my criteria for the slice is

 

AND([In Hospital]=yes,[Hospital]="WTH-J")

 

 

It passes expression validation, however it doesn't work because as I look at the patient table, while i see WTH-J in the UI when checking a patient record, the table actually shows 0b6c415c which is the key for that hospital record. The Hospital column in the patient record is a ref.

How do I get my expression to look at the label instead of the key, and/or how do I get AppSheet to write the label back to the table instead of the key? Which method is preferred? I assume the key needs to be written to the table in order to preserve the referece.

Thanks

Solved Solved
0 2 927
1 ACCEPTED SOLUTION

2 REPLIES 2

In case this will help someone else, i changed my expression to

AND([In Hospital]=yes,[Hospital].[Hospital Name]="WTH-J")

 

which if i get the terminology right, creates a derefence to target the Hospital Name value referenced by the key in [Hospital]

If someone with more experience needs to correct my understanding of what happened, please do. I can accept that it works, but i also must understand what goes on under the hood.

Top Labels in this Space