Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Need button to trigger event in another database...


kcjones76
 Share

Recommended Posts

I've played around with FM for a couple years now, but nothing really complex. I will probably be frequenting this forum now that I've found it.

 

I have a database that gets populated by importing records. The problem is that the text always needed formatting changes. I created button-attached scripts for each of the changes. For example, I have a list of items separated by commas, that I use the replace function to replace the comma+space, with a hard return, resulting in the list appearing properly in a text field. Others includes stripping an end colon, changing the case to Proper, and adding a new paragraph with space-before after each period (each of these apply to different fields of a record).

 

First question: Can I have the script(s) triggered upon importing new records as an option?

 

My screen real estate is limited and I need to make efficient use of space. I tried using the hide-buttons-in-a-portal technic, that only appear when a script is triggered by a button. The problem with this is that when the portal overlaps any top-right corner of an element that's not included in the hidden group, it also hides that portion of the element. Not good. I gave up on that idea and decided to make a separate database that would serve as my tool palette, if you will.

 

Second question: The problem I have now is that the scripts can't point to the fields in the actual database I need them to work with. How do I do that?

 

Using the hide-portal technic, I added the toggle to a 2-selection radio button. Based on which item I select, a clickable button will appear that will take me to another layout (it's essentially a tabbed layout where I only want the tab to appear when the radio button satisfies the criteria. Well I got it to work, but now if I end up in the other layout, and start browsing records, where the tab is not supposed to appear the tab is obviously there. Sounds confusing? You should be me!

 

Third question: Can I have the radio button hide the tab in this layout as well?

 

Thanks for any help!

Link to comment
Share on other sites

Hi kc,

You have a number of questions there! smile.gif

 

Answer One: As regards triggering of scripts upon import, perhaps the simplest solution would be to place the import procedure within a script, which goes on immediately after import to perform the required additional steps.

 

Answer Two: You can make scripts point to fields in another database via a relationship. However a better solution may be to leave the scripts in the database where the fields are, and create scripts in your 'tool palette' dababase that call the original scripts as external sub-scripts, using the Perform Script [ ] command.

 

Answer Three: The one radio button can hide tabs in as many layouts as you like simultaneously, so long as the tab portals are all based on the same relationship that the radio button makes and breaks.

 

From your description, however, I am left wondering whether the re-appearance of the tabs may be associated with moving between records rather than moving between layouts. If so, then this woudl seem to indicate that the Radio Button field is not a global field, and that it's default state on records other than the one you have set it on is not what you require.

 

If that is the case, perhaps you might consider looking at this to ensure that the field type and default values line up with the tab visibility functionality you are trying to achieve.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use