Only one popup to display different messages

Hi Team,

I am working on perspective.
I have 2-3 dropdowns, calendar, text boxes and submit button in my screen.
I need to show many message/warning boxes inside the script.

As in vision, we cant use message box in perspective so we need to use popup views.

so can we create only one popup view to show different messages in the label which is in popup view.

I tried using parameterized popup view.

But I am not getting how to use inside the script which is on submit button and in dropdown.

please help.

Thank you

If I understand correctly you want to show a popup both when selecting something on a drop down, and when you submit?

one solution is to create a 'template' view that has a label, a confirm button and a cancel button. Use a payload parameter to send to the view. In there you could have a key for the label text you wish to display in your popup, and the data you need to pass into a message that the confirm button would send.

Then have a message handler script that deals with the payload sent from the confirm button

HI,
image

if selectedLine == '':
							#system.gui.warningBox("Please Select a Line", "Error Message")
							system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = 'Please select line')
						elif selectedOrder == '': 
							system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = 'Please select SAP order Number')
							#system.gui.warningBox("Please Select SAP Order Number", "Error Message")
						elif enteredMachineId == '':
							#system.gui.warningBox("Please Enter Machine ID","Error Message")
							system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = 'enter machine ID')
						elif selectedPartNumber == '':
							system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = 'Please select Part Number')
							#system.gui.warningBox("Please Select Part Number", "Error Message")
						elif selectedStatus == '':
							system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = 'Please Select Status')
							#system.gui.warningBox("Please Select Status", "Error Message")

here I am using popup views for each message, how can I show this using only one popup.

I hope you understood my requirement, if not please let me know I will clear it again

Is this more toward what you are looking for?

errorMessage = None

if selectedLine == '':
	errorMessage = "Please select a Line"
elif selectedOrder == '': 
	errorMessage = "Please Select SAP Order Number"
elif enteredMachineId == '':
	errorMessage = "Please Enter Machine ID"
elif selectedPartNumber == '':
	errorMessage = "Please Select Part Number"
elif selectedStatus == '':
	errorMessage = "Please Select Status"
	
if errorMessage:
	#system.gui.warningBox(errorMessage, "Error Message")
	system.perspective.openPopup('myPopupId','Page/Embedded/popup',position = {'center':100,'center':100},title = errorMessage)
2 Likes

Thank you,
I tried this, I am getting output.

system.perspective.openPopup('myPopupId','Page/Embedded/MessagePOPUP_BOX',position = {'center':100,'center':100},title = 'Line is in progress', params = { 'param2' : "Line is in progress "})