Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (edited)

Hello again. Here's the deal...I have one form, user inputs order#, date, etc. Order# is passed to another form called OrderEditForm where you need to add customers. I have a button to go to CustomerTable...here's where the problem lies.

Once I get to CustomerTable, if it is a repeat customer, how do I let the user select the Customer and pass that CustomerID back to the OrderEditForm (for population of that form), or if it is a new customer, add said customer to CustomerTable?

I can't figure out how to make the CustomerTable selection pass from one layout to another. Is it one of those Get() functions or what?

Thanks in advance.

Edited by Guest
Posted

You can always use Set Variable [] :(

After you go to the custom layout, you can have your user choose the customer that they want which in turn should set a variable with the CustomerID. Then go back to your Order layout and set the foreign key.

If its a new customer, after creating the new customer, you can script it to do the same.

Posted (edited)

Yeah, that is what I want to do...but the problem is that I don't know where or how to script it. As I said, I can't figure out the where's and how's and such of the code.

Edited by Guest
Posted

Well it can be as easy as the following:

The button on the customer record can have a script parameter of the CustomerID.

Then the script that the button is attached to can be:

Go to Layout [OrderEditForm]

Set Field [ fkCustomerID; Get(ScriptParameter)]

Posted

I'm sorry but I am not catching that. Please bear in mind that I am new to FM and trying to figure out how to code the buttons. Can you be a little more specific with your explaination?

Thanks

Posted

Make the script first.

Next, when you are defining your button, in the dialog where you pick the step scripts, choose 'perform script'. It will then display a 'Specify' button. When you click that button, it will allow you to choose your script that you want to assign to the button, but also it will show you a box where you can type in an additional script parameter.

Hit edit and then choose the CustomerID.

I would suggest doing some of the online tutorials / videos to help you along.

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