
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Call javascript from format
Hello,
is it possible to call a javascript directly from form designer? I tried these steps:
1. fd -> myForm (for myTable)
2. go to myField use this as input: jscall("myJS.myFunc", contact.name) where contact.name is a field of myTable
No syntax error will be returned, but also no result. Could you please help? I only need it in format, not in formatctrl, not in display option etc.
Thanks,
Tianying


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello,
this wont work that way - so answer is no.
Use methods which you listed in the end (do , fc ... ). What is the reason of not using them? Specific requirement which makes them not fit for it?
Vadim
HOW TO ASSIGN POINTS - Kudos - what, where, how, and why
New Forum Locations by ITRC Tree
New Forums Site Map
Want Good Answers? Ask Good Questions...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Vadim,
thanks for your reply. Yes, it's a device table qbe list. Instead of the contact name the customer required to display the contact email. In their environment the only contact name is stored as a field in device. The email has to be retrieved via link record from contacts table. I wrote a script therefore, but I know it's not possible to call it from qbe, just hoped maybe it's possible to call a js from a regular format.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
On a form, the only way to call a javascript is in a html viewer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
just an idea: How about using a joindef for this to display the required information in the QBE.
Didn't tested it, but if you create your own joindef for device and contacts, you should be able to display the email in QBE.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
not sure which version you are using. in SM9.41 there is already a "relatedObjectMap" record that joins the contact.name in device table with contact.name in contacts table.
so, when you update/define a view for device table, define which fields to display, and select contact.name and then "Email" from Contact. see attached screenshot for details

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The QBE will be poped up by clicking the fill button (realized in link). It's not in the view, therefore I cannot get the email cross table even a relatedObjectMap is available. I have SM9.41.
I'll try the joindef option.
Thank you all for giving me example and ideas!