How do I return a value to FileMaker?
You will often want to return data to FileMaker from your custom component. This lesson will show you how to do this.
This example stack will get the long time and date in LiveCode and return the value when the "Return and Close" button is clicked.
To show a custom component the stack is shown using the modal command, this pops up the component in a modal window. Any code that comes after the modal command is executed after the stack is closed.
To return a value to FileMaker you use the return control structure.
Note: with modal stacks you must provide a way to close the stack, either through a button or other method such as automatically closing the stack when it is clicked.
on FileMakerAction pAction
put the long time && the long date into field "timeAndDate"
modal stack "valueReturn"
return field "timeAndDate"
close this stack
When your component is complete import it into FileMaker following the steps in this lesson.
Once your component is imported you can get the returned value by calling the component with via the LC component.