Jump to content

Recommended Posts

  • Newbies

Hi All,

Hope you all are doing well. Not very FM savvy, need your help!

I'm looking a syntax solution for something like this:

If condition meets FormIsGood is Yes, then a button appears that will be able to trigger script that imports/copies(append) current record(or few of the fields of current record) into our MASTER DB.

In a little more detail:

We have two databases, one is transition and other is master. The registrations we receive stores inside transition, an admin staff verifies that registration record and then copies(appends) the record (some fields) to the master database. I want to automate this step using two concepts: 

1. Staff does a yes/no radio button check(say: FormIsGood) confirming this record is good to copy over to the master db. (this does not have to be radio button, can be a checkbox or a field, whichever is easier to work with)

2. Now, based on the above, a button appears when the FormIsGood condition meets (say: Yes for example). This button upon pressing should then trigger a script to copy/append over the current record (ideally only the selected fields we want to copy over as our master DB is a bit different and might not contain all the fields) to the MASTER DB
 

Anybody who can help with any of the two or both. I'll be grateful! :)

Thanks

Syed

Link to post
Share on other sites
  • Ocean West changed the title to Show/Hide Button Conditionally.

Greetings Syed

first you have your boolean number field that will have zero nothing or a 1

if you press a button to add a 1 to the field you want another button to conditionally show on the layout for the user to click the button and perform an action.

On the button that runs your script you will notice in the inspectors panel on the last tab Hide Object When you can simply add the boolean field to this as  

Not FormIsGood

or use one of these it depends on what is easier for you to read  FormIsGood ≠ 1 or FormIsGood ≠ True  or FormIsGood = False 

This will hide the button until the value is true. 

You may also wish to REHIDE the button once you press it and move your record to the Master DB you may wish to have a second field FormIsTransferred setting that field to either a boolean or a timestamp which ever makes sense. Because you don't want to move the record over more then once.

Then you would need to adjust your logic in the hide button.

Not FormIsGood or FormIsTransferred

I do recommend you add logic to your script so that it too will not be able to move your record or alter data until the two fields meet your condition other wise running the script manually will bypass your implied business rules on the hide logic. 

 

Link to post
Share on other sites
7 minutes ago, Ocean West said:

Because you don't want to move the record over more then once.

I would suggest having a relationship between the two tables. This would not only make creating the "master" record easier, but also eliminate completely the possibility of creating it more than once.

 

  • Like 1
Link to post
Share on other sites

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.