Jump to content
Server Maintenance This Week. ×

Active Record displayed in a Self-Join?


trevorg

This topic is 8116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a job ticketing database that uses a self-join relationship to list all previous tickets for the client. (ClientID=ClientID)

I would like to indicate which ticket the user is on by highlighting it within the portal by using a calculation to "get" a highlight graphic.

Is there a way to do this without requiring a script to "mark" a record. I would like it to be based completely on calculations so when the user clicks through the records the highlight moves up or down in the portal.

I've been trying for a few hours now, but can't seem to find a function that truly shows the ACTIVE record (ID or Number) because when referencing through a portal it only shows it's own number (not the Currently ACTIVE record that is in the foreground)

Any suggestions?

Link to comment
Share on other sites

Okay. If it weren't a self join I could probably think of other ways, but here's one, which requires a script on entering the record, and on exiting.

Define two fields

Active (num)

CurrentRec(If(active rec = 1,1,0))

Two scripts

OnEnter:

Set Field(Active, "1")

OnExit:

Set Field(Active,"0")

You can use that flag to trigger active icons, or whatever you want. Unfortunately this method means you'll have to script all possible means of entering and exiting a record.

Link to comment
Share on other sites

Just reread your post (a good practice I should get into). Scratch the mark record method I just suggested, if that's really out of the question.

The problem here is basically there is no Status(CurrentSelectedRecordID) to compare to Status(CurrentRecordID).

Link to comment
Share on other sites

Errr, isn't the current record the one selected? I know it gets a bit tricky in portals...

Another method might be to do away with the portal, move the user to the related db and show them the records in plain old list view.

Link to comment
Share on other sites

"Errr, isn't the current record the one selected? I know it gets a bit tricky in portals..."

That's what I thought too. So to test it I put a field inside the portal that was a calculation of (Status(CurrentRecordID)) thinking it would display the SAME ID of the record the user is currently on, but no, it shows the "current" record ID of each individual record. (remember this is a self join also).

Removing the portal and just taking the user to a list would remove the convenience of the "at a glace" effect the portal has. The user really doesn't want to go to the other jobs, but conveniently view them quickly for reference without having to navigate back and forth. That was the idea behind highlighting the ticket the user is on at that particular instance, just another convenience. (Which is what making a database is all about, aiding the user to do their job as quickly and efficiently as possible)

To that end, I would like to suggest to FileMaker that a truly "current" or "active" or "foreground" status function could be of use to some.

Link to comment
Share on other sites

  • 2 weeks later...

Hmmm... Seems so simple, and it IS simple with a script, but with only a calculation... might be impossible! Weird. Maybe something to do with Stored vs. Unstored calculations, concatenated ClientID/TicketID, uh, maybe a constant join with a separate file that calculates the Status(CurrentRecord): I don't know, it's late and I'm falling asleep. Nothing I tried worked. shocked.gif

Link to comment
Share on other sites

The Bridge, the tips on that site are great, but we're trying to figure out how to do it without using a script.

I think you'll have to use a script, but you could lock the user out of the status bar and create your own "fake" status bar for navigating through records. It still wouldn't help if they used the keyboard to go to the next/previous record, though.

Link to comment
Share on other sites

This topic is 8116 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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