How to open a specific layout in another screen

Ha ha... I missed the global variable... it was right there...

more valuable feedback now: :wink:

  1. the second item of a pair never is the text "mainmenu", so the if part never will be executed...
    usually you would use a MainMenu button handler for this assuming you have a button MainMenu in your project
  2. don't use a for each in list loop, try the loopup in pairs block to get the screen name you are looking for together with the key component
    How does the lookup in pairs block work?

see also this example A Multiple Choice Quiz: How to work with the advanced features

Taifun

I want to use Any Component block to:

  • There are 8 buttons in a vertical arrangement on screen 1.
  • When a button is clicked, it has to open screen 2, and in screen 2, open a specific vertical arrangement and also calls a specific function that renames labels and changes images in respective placeholders.
    *for eg: IF I CLICK THE DOG BUTTON ON SCREEN 1, IT OPENS SCREEN2 AND THEN IN THAT, OPENS THE "DOG" VERTICAL ARRANGEMENT, ALSO IN THAT VERTICAL ARRANGEMENT, IT HAS TO CALL A SPECIFIC FUNCTION, THIS FUNCTION RENAMES A LABEL TO "DOG" AND IN THE IMAGE PLACEHOLDER, CHANGES FROM THE USUAL IMAGE TO DOG IMAGE...

Please help, I need to complete this project very soon,
Thanks in advance

You can do this using start value.

how? i cannot figureout? please help... I shalll be thankful

Let's say if someone clicks on ButtonA then any button click will give ButtonA as component.
Now if component == ButtonA then open another screen with start value A.
On Screen2, if start value is A then hide all arrangement and set Arrangement A to visible.

1 Like

Can i use a list to get Button A or Button B? If yes, how?

Can you please roughly show the blocks?

I merged all your three topics together since they are related. Please stay with your topic instead of opening a new one.


I put this on the first screen
image

This on the second screen,

the button takes me to the right place , but as stated does not change title.text to dog... please help, I am probably having some trouble with start value...

You are sending a component as string and comparing it with a string.
Just set label.text to start value and you will know the reason.

So what am I doing wrong and what am i supposed to be doing?

image
Nothing happens, same result... I cannot figure it out...

Have I said here to use if condition?

So which block to use to implement it?

...on screen initialize without any condition.
It seems you are new here and not able to understand logics.
I suggest you to read tutorials and FAQs.

I also need to change a few images, according to the start value, for example, if start value is dog, i need to put the picture of a dog, if it is cat, i need to put image of cat,that is why i am confused

But first you will have to learn to send and use start values.

Off-topic

I am not one of those who give blocks and think that problem has been solved.I believe in self-learning instead.

@vknow360 my project has a very short deadline, i need to submit it, otherwise, i am seriously going to learn itall, I understand that but i need help right now... I am in some big problems...
But otherwise, i am going to be learning it for sure...

Does this give you any idea?

image

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.