Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Two portals from one file yield blank entries

Featured Replies

I've got one file (eye surgery) in which every surgery is a record. There are two portals that list all patient surgeries, one for the right eye and one for the left eye. Unfortunately, when the right eye has a surgery, the left portal creates a blank entry, and visa versa. Is there any solution to this? The portals look a little questionable with the blank spots in them. Plus, if you click on the portal (button) in a blank spot in the left eye portal, your taken to a right eye's surgical record.

Thanks!

Basically, while I assume you currently use a relationship Patient_ID::Patient_ID, you'd need to move to a new relationship (actually 2) using a calculation at right side (of your relationships) :

c_WhichEye = Case(EyeSide = "Right"; Patient_ID&"-"&"Right";EyeSide = "Left"; Patient_ID& "Left";"") - indexed.

Then, at left side, you'd need a couple of calculations that would allow to match this new key.

One way of doing this could be to use 2 global text fields, populated with "Right" and "Left" and use 2 calculations (unstored) :

c_unstLeftEye = Patient_ID&"-"g_Left

c_unstRightEye = Patient_ID&"-"&g_Right.

The Patient_ID could be another global field, and the g_Left and g_Right could be calculations or autoentered text, depending on your needs.

Then, obviously, use both calcs for a relationship to the c_WhichEye key and make sure your fields in portals are using these new relationships.

All the best.

  • Author

That makes sense - to define a unique relationship to each portal. Thanks Ugo!

I've uploaded a sample of your solution. One other question. I'd like to automate the entry of the "EyeSide" field based on which Surgery field is selected. I tried the following calculation, but the calculation was not accepted. Whats wrong with this calculation:

Case (IsValid (Surgery Right Eye), "Right",

TwoPortals.zip

That's how I'd handle this one.

Some little changes.

At right side :

PatientID - Auto-entered

Surgery Right Eye - by Value List

Surgery Left Eye - by Value List

It can be handy to add some "number based" calc, so here are the changes to my previous suggestions.

This would be particularly helpful if you had to use some toggle script steps later on.

c_WhichEyeNum (calc, number) = Case(not IsEmpty(Surgery Right Eye), 1,not IsEmpty(Surgery Left Eye),2,0)

c_WhichEyeText (calc, text) = Choose(c_WhichEye,"", "Right","Left")

c_EyeKey (calc-compound) = Choose(c_WhichEyeNum, "", PatientID&"-"&1,PatientID&"-"&2)

These calcs would work as you said you have only one Surgery Category selected per record. Validate by calc to prevent errors.

Now, change your globals in the Portal File.fp5 to :

g_Right (number) = 1

g_Left (number) = 2

Please note that for clarity, you shouldn't use the "g_" abbreviation if the field isn't a global field.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.