In the appsheet I created a table called MENU
TABLE FIELDS:
IDMENU - Type text
MENU - Type text
ICONE - Type Image
VISUALIZACAO - Type text
VIEW: MENU
For this data: MENU
View type: Galery
Event Actions: IR_MENU
ACTIONS:
Action name: IR_MENU
For a record of this table: MENU
Do this: App: go to another view within this app
Target: LINKTOVIEW([VISUALIZACAO])
Position: Inline
Attach to column: VISUALIZACAO
In other words, in VISUALIZACAO there will be the name of other views, and when I select one of the options, I will be directed to the view I defined.
However, currently in my Menu table I have 3 lines with information, that is, there are 3 buttons in my MENU view.
Two test buttons will direct to the views I defined. But I wanted to do something different with the third button: I wanted it to direct me to a link on the internet.
IDMENU | MENU | ICONE | VISUALIZACAO |
1 | Questionรกrio | MENU_Images/p6Ayf_ALFj4KIpbj0mYFRf.ICONE.181733.png | QS_Dados |
2 | Mรฉdico | MENU_Images/BZ3XgtreE74bQmUEHlR_Hc.ICONE.181839.png | Mรฉdico_Dados |
3 | MENU_Images/jMp4p6JGmG4Q6cBDciR6F7.ICONE.185621.png | https://www.google.com |
Example: I want the third button to take me to the link www.google.com when I click on it.
How do I do this?
Solved! Go to Solution.
Here is my suggestion:
- create two columns, one for internal view name, the other for external link
- use a sequence of actions, one to open the internal view name, the other to open the external link
Here is in image my suggestion (tested, it works)
Table structure
Table settings (add a virtual column)
with expression:
"#view="&[internal_viewname]
Action setting
View setting
Result
โ
here's how I do it
I have 3 actions for MENU
action "open_url"
do this : "external : go to a website"
target : visualizacao
position : hide
behaviour only if this condition = true
test if visualizacao is a valid link
action "open_view"
do this : "linktoview"
target : LINKTOVIEW([VISUALIZACAO])
position : hide
behaviour only if this condition = true
test if visualizacao is not a valid link
action IR MENU :
do this : "Grouped : execute a sequence of action"
action1 : "open_url"
action2 : "open_view"
Position : Inline
Attached to column : VISUALIZACAO
there are various ways of testing whether it's a url or not.
Here is my suggestion:
- create two columns, one for internal view name, the other for external link
- use a sequence of actions, one to open the internal view name, the other to open the external link
Here is in image my suggestion (tested, it works)
Table structure
Table settings (add a virtual column)
with expression:
"#view="&[internal_viewname]
Action setting
View setting
Result
โ
Hi @Aurelien
It worked really well this way, thank you very much!
You are welcome ! ๐
User | Count |
---|---|
16 | |
7 | |
5 | |
5 | |
3 |