Skip to main content
4-Participant
March 14, 2023
Question

If-Function and Drop Down Menu

  • March 14, 2023
  • 1 reply
  • 3487 views

Hello,
I am trying to select different settings in a pop-up window using a drop down menu. Depending on the selected functions, my Command Button should trigger a different command. What is the correct syntax here?

 

I have tried the following, which unfortunately does not work:

 

if(scope.view['Home'].wdg['select-1']['value'] == " Test"){hide("popup-Window");

1 reply

21-Topaz I
March 14, 2023

Hi @QP_10574780 ,

so possibly you can try something like this

if(scope.view['Home'].wdg['select-1']['value'] == " Test"){
$timeout( ()=>{
 $scope.app.fn.triggerWidgetService("popup-1","hidepopup");
 $scope.$applyAsync( )},1000)
}
// or 
if(scope.view['Home'].wdg['select-1']['value'].indexOf("Test")!=-1 )
$timeout( ()=>{
 $scope.app.fn.triggerWidgetService("popup-1","hidepopup");
 $scope.$applyAsync( )},1000)
}

here popup-1 is the name of the popup widget. You mentioned there a popup menu which is different to that where I provided the example but when I see the name popup-window I think this is a popup element/widget . If not then please, explain more detailed what is your UI what you want to use e.g. , please , provide a picture and some details what is the goal. Thanks

4-Participant
March 14, 2023

Hello,
thank you very much for the quick reply.

I am using a pop-up window here.
That is, first I call the pop-up window. In the pop-up window are also the drop down widgets. Here I can select different configurations. I then confirm this with a command button. A screenshot is attached.

4-Participant
March 14, 2023

Is there any documentation on how such syntax should look like?

What would be a possible syntax if I want to hide a component depending on the configuration?