Jump to content

How to create a button in a dialog box to go to specific record


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

Recommended Posts

Doing some particular actions in my DB will bring up a dialog box with an instruction or warning.  Now I want to create such a box with one of the clickable buttons being programmed so it opens to a specific record, and always that specific record.  Preferably this opens in a new window in the same DB.  FYI the record will be in the same layout that is already open.  

I can however, not find how to do this.  Any help would be appreciated. 

 

 

Link to comment
Share on other sites

Script prototype...

Start script

Do stuff before....

Show Custom Dialog

Set Variable $whatever = Get (LastMessageChoice)

Case (

$whatever = 1 ; Do action 1 ;

$whatever = 2 ; Do action 2 ;

Do action 3 )

Do more stuff....

End Script

 

To create a found set use the Perform Find script step but there are other ways such as GTRR through the relationship graph to the found set and open it in a new window.

Edited by Kris M
Link to comment
Share on other sites

IOW, we need a bit more detail to provide you more detail than Kris' good example.  If you wish to capture a User's selection for any reason, you will need to provide them with global fields.  These could be referenced in the second tab of the Show Custom Dialog[].

You might also consider just opening a popover and having your global fields there.  

Edited by LaRetta
Link to comment
Share on other sites

BTW, the button in the Show Custom Dialog ... you need to capture the User's selection, whether button 1, 2 or 3.  Standard way do this with example two buttons, immediately after Show Custom Dialog ...

If [ Get ( LastMessageChoice ) = 1 ]
... do thing 1 - this is the default button
Else
.... do thing 2
End If

Edited by LaRetta
Link to comment
Share on other sites

I want to create such a box with one of the clickable buttons being programmed so it opens to a specific record, and always that specific record.

You have left out the most important thing: what is this "specific" record? How can it be identified? Is it the first record in the table? Or perhaps the most recent one? Or something else?

I have the uneasy feeling that this request is a result of an improper structure, where one "specific" record plays a role entirely different from its siblings - and as such should properly be a parent record in another table.

Link to comment
Share on other sites

Thanks everybody for replying, appreciated.

 

First of I am not real good at FMP so maybe that is why my question, to you pro-type-folk, appears a bit unclear. 

 

Hopefully this explains it better.  My DB contains passwords for all kind of things and other secure information.  I have one record, let’s call it RecordA, this record holds information to log in to a specific process, lets call it ProcessX.  One can log in using the information displayed in RecordA and see al information in ProcessX.  However if you want to make a change to ProcessX, you need to log in to it via a different route, using information in a different record, lets call it RecordB.

 

At present if you click on one specific button in RecordA, it opens a dialog box that states that if you want to make changes to ProcessX, you will need to login via the information in RecordB.  In the message box all you can do at present is click the OK button.  (I have only one clickable button with a name in the setup, hence only one shows).

 

I now want to make a second clickable button in the message box.  This button should open a new window in the same DB displaying the information of RecordB.

Am I clear now?  Look forward to your suggestions how to achieve this. 

Link to comment
Share on other sites

It sounds like a nightmare project for a "Novice" level developer because, from your difficult to understand post, it sounds like you are building a homegrown security system without knowing the ins and outs of FileMakers built in security functions.

The prototype i posted is a simple way to produce a dialog with a script and allow the script to respond to user selections. If you don't understand that prototype you should not be trying to develop something as complex as you describe.

Now i don't mean to discourage you from attempting this but it seems like you are trying to build a skyscraper with only the knowledge of how to build a house.

Edited by Kris M
Link to comment
Share on other sites

Start with the FileMaker training series and work through every exercise.

Hi Kris, thanks for that suggestion.  See my situation is that I am helping (as a volunteer) a charitable organisation, as I want to make their lives a bit smoother, easier.  If I had the time to work myself through such a set of manuals I might as well become a programmer.  However I have already a full-time job and no ambition in this direction.

 

That is why I come to these forums from time to time in the hope of finding some help in solving it without having to maybe spend months learning skills that I might never use again.  Still thanks for thinking with me. 

Link to comment
Share on other sites

Perhaps you should look at the starter solutions or other free prebuilt solutions (fm starting point by Richard Carlton Consulting) and go from there instead of trying to build something custom from scratch.

What does the database need to do in one sentence?

If we know the ubergoal perhaps someone here can point you to a resource already built.

If i was a charitable org and needed software i'd rather have something for small cost that is well built than something free that's fragile and may not be designed well.

And if your bumping up against sensitive data then you reallly need to know what your doing or you could be legally responsible for the security of the data should their ever be a breach.

Good intentions are not usually considered by the law.

Edited by Kris M
Link to comment
Share on other sites

Hi Kris, thanks for your concern.  The DB was build in FMP 4 days and upgraded along the way.  It works fine ever since and the design was originally done by a professional (who died unfortunately somewhere around FMP12, so we can not ask him anymore).  So all I want to do is ad this little tweet (I explained in detail above, hope that is clear).  There is no legal concern, this has been cleared.  After all, I am helpful but not dumb.

 

Thanks for the link to Richard Carlton.

Link to comment
Share on other sites

Hopefully this explains it better.  My DB contains passwords for all kind of things and other secure information.  I have one record, let’s call it RecordA, this record holds information to log in to a specific process, lets call it ProcessX.  One can log in using the information displayed in RecordA and see al information in ProcessX.  However if you want to make a change to ProcessX, you need to log in to it via a different route, using information in a different record, lets call it RecordB.

 

Suppose you have 2 tables: Processes and Logins, related by ProcessID (i.e. one process can have many logins). And suppose each process has one (at most) special login record, that contains credentials for full access to the process. For this purpose, there should be a FullLoginID field in the Processes table, containing the unique LoginID of the special login, as well as another relationship between the two tables, defined as:

Processes::FullLoginID = Logins 2::LoginID

With this is in place, you can have your script branch to:

If [not IsEmpty ( Logins 2::LoginID ) ]
 Go to Related Record [From table: Child2; New window]
End If

Note: I am assuming that these processes have nothing to with Filemaker itself, and that the solution being discussed is well-protected as befits a solution storing sensitive data.

  • Like 1
Link to comment
Share on other sites

This topic is 3229 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.