Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Printing If Dropdown=Yes

Featured Replies

Hi,

I have searched but can’t find an answer to this exact question:

I have a yes/no dropdown on my layout, is it possible to have a report printed if the user selects “yes”.

I am attempting to do it via a “Case” calculation, but I am not getting too far…I think Im going about it wrong.

Could someone please point me in the right direction once more J

Thanks for your time.

James

James,

It may make more sense if you have an interface in which you could allow the user to select which reports that they want to run rather than the way you suggested.

Maybe I am misreading your post. Are you looking to flag a particular Record to print as part of your report or are you talking about the ability to choose multiple types of report?

Well, you could place a field, MyPrintField on your layout and make it a button that scripts both the setting of the field AND the call to the report:

If[MyPrintField = "Print"]

New Window["Boogaloo"]

Go To Layout["MyPrintLayout"]

Print["No Dialog"]

Close Window["Boogaloo"]

Set Field["MyPrintField"; "Printed"]

End If

This will go to another layout and either preview if option is anything other than yes, or preview and print if the option is yes.

Allow User Abort[Off]

#Removes cancel option from preview window.

SetVariable[ $userChoice = YourDropDownField ]

#Capture user choice before going to a potentially unrelated table

Go To Layout[ LayoutYouWantToPrint ]

Enter Preview Mode[Pause]

If[ $userChoice = "Yes" ]

Print[]

End If

Go To Layout[ original layout ]

Or to just answer your question simply:

If[ YourField = "Yes" ]

Print[]

End If

  • Author

T-Square; I put your example to work and I think it will do what I need.

Hopefully one day, I will have all this down!!!

Thanks Everyone...Im still poking away attempting to learn as I go.

I guess I should have explained what I am attempting to do a little better:

I have a layout for work, and there is a question "Do you want a copy of a-canned-report", the dropdown is a yes/no option.

I was hoping that the user could just select yes from the drop down and the canned report would print out...giving the user the report and marking the field as "yes" showing they printed the report out. And they could continue entering data on the main page without interuption.

Thanks again.

James

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.