Display the popup Message on the screen by the value of the Input Parameter

I want to display each message saying Easy or Normal or Hard around below on the screen by the value (1 to 3 which show DifficultyLevel here) of the input parameter.

It is kind of like a pop up message saying "Easy" or "Normal" and so on.

 When you press the "Easy""Normal" "Hard" button, Skip Server Action will work.


I've attached the .oml file so that you can see the details.

I think you will see everything if you take a look at my .oml file.

I'd like you to check it and give me some clue if you like.

I look forword to you help and your reply.


Best regards,

Yes, just pass the value as input parameter to the pop-up web block and put conditions to display the content accordingly.

Tushar Panpaliya wrote:

Yes, just pass the value as input parameter to the pop-up web block and put conditions to display the content accordingly.


Thank you!

BTW,   where can I get the popup Web block?

I know it is asking a lot...But I'd appreciate it if you could  elaborate on it.


Best regards,

Solution

Tsubasa Yoshikawa wrote:

Tushar Panpaliya wrote:

Yes, just pass the value as input parameter to the pop-up web block and put conditions to display the content accordingly.


Thank you!

BTW,   where can I get the popup Web block?

I know it is asking a lot...But I'd appreciate it if you could  elaborate on it.


Best regards,

No Worries. You can refer to this  : https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Inputs/Create_and_Use_a_Popup


Happy to help!


Solution

Tushar Panpaliya wrote:

Tsubasa Yoshikawa wrote:

Tushar Panpaliya wrote:

Yes, just pass the value as input parameter to the pop-up web block and put conditions to display the content accordingly.


Thank you!

BTW,   where can I get the popup Web block?

I know it is asking a lot...But I'd appreciate it if you could  elaborate on it.


Best regards,

No Worries. You can refer to this  : https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Inputs/Create_and_Use_a_Popup


Happy to help!


Thank you for telling me the details about it.

But  the way to use Layout Popup doesnot seem to work  for me....

To be honest, I hope to implement this function by using Expression Widget..

I need some clue for that.

Do you have anything about it  in mind?


Hi Tsubasa,

  • add another local variable to your screen, for example with the name DifficultyString
  • add an expression on your screen where you want it, and set it's Value property to DifficultyString
  • in both your Skip and RandomNumber actions, add an assign as follow


This is the full value in the assignment :

If( GetQADisplay.List[RandomRowNumber].QA.DifficultyLevel=1, "This is an easy text", If(GetQADisplay.List[RandomRowNumber].QA.DifficultyLevel=2, "This is a normal text","This is an hard text"))

Dorine


That being said,

there are a number of improvements to be made to your oml that would greatly improve the quality, here are a few :

  • If you change the Filter of your Aggregate in your Skip Action, you can use the same Skip action for the Random button, now you have 2 almost identical actions, skip and randomdisplay = double code to maintain
QA.DifficultyLevel = In1 or In1 = NullTextIdentifier()
  • You don't have to loop through the aggregate list to find the row that matches your random number, you can just use index notation, for example : GetQADisplay.List[RandomRowNumber].QA.Japanese
  • You should add some more checks in your actions
    • when user clicks hint, check if there are still more hints to give, otherwise give a feedback message that the full text is already shown
    • when user asks for a easy question, for example, but there are none, give feedback message
  • Data modeling : model the difficulty level as a static entity, this allows for better readable code, you don't have to hardcode against level 1 for example, but can use Entities.Difficulty.Easy in your logic, but it also allows for a dropdown on your QA detail screen, now it is possible to add difficulty 25 for example, because it is just an integer