Skip to main content
Archived

Prompt message or dialog box

Related products:Transformers
  • July 11, 2018
  • 1 reply
  • 2 views
jbeamish
  • jbeamish
    jbeamish

There should be a way to have a dialog box appear in the workspace to notify the user about the output of the transformer. There is the logger transformer, but the message supplied only appears in the translation log. It would be helpful if you could run the workflow and get feedback that could then lead to alternative workflows depending on the output

<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 11, 2018

While not generally considered best practice, and must not be used for FME Server, you could use the ctypes.windll library in a python caller

import ctypes def processFeature(feature): msg = "This is the message that appears" title = "This is the title of the message box" x = ctypes.windll.user32.MessageBoxA(0, msg, title, 1) feature.setAttribute("Response",x)

 

In this example, pressing the okay button returns a value of 1, and cancel a value of 2. There are several different message box available via windows, and quite a few settings for them.

 

You could look into https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox is you want more details.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings