how to create a button for each row?

I have a form app with Nth rows.
How to create a “go to” button for each row?

So that it passes key params into respective app?

You can create an application link to do just that. It will show a pencil to click on. If you want a button you can create a small gif of your of and then add a custom field to your grid of type image. Then you can allocate your image and beneath there are settings to define a link.

Any steps.by steps or example?

Go to links -> application link. Select application to link to and map the key fields. Choose if you want it modal or not., That’s all.

Or

Go to fields -> new field
Use image
Select the image to show and click on ‘link’ button below. Then it’s like above, select appliation etc.

The options provided are limited, what if I need to put in PHP code control? Like if.they click row 1, it redirect.to employee app, if click row two, system redirect to teacher app?

I was not aware that you had to jump to different applications. What you might try is to use an onrecord event to set a hyperlink on the field.

Can provide a working sample?

Thanks in millions

welies, did you try onRecord event as Albert told you? just go there and add the link macro to other application or variable, try it, seems logic and should will work.

Working sample:
Create custom field (here it is {go_to})


onApplicationInit:

print ("<style type='text/css'>.mybtn
{
	color: #FFFFFF;
	border: 1px solid #734500;
	font-weight: bold;
	font-size: 11px;
	background: #EDB817;
	height: 25px;
	width: 80px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	vertical-align: middle;
	padding: 0px;

}

.mybtn:hover {
	cursor: pointer;
	background: #FED471;
}
</style>");



onRecord:

switch({status})
{
	case 1:
		{go_to} = "<a href= '/live_html/livescore_start.html' target='_parent'><button class='mybtn' type='button'>Livescore</button></a>";
		break;
	case 2:
		{go_to} = "<a href= '../form_liveresult/form_liveresult.php?v_klasse=[v_klasse]&header1=[v_header1]'><button class='mybtn' type='button'>".{lang_btn_ergebnis}."</button></a>";
		break;
	default:
		{go_to} = check_startliste();
		break;
}


jsb

i managed to create the link in GRID app!
Thanks all for the help.

But i realized it doesn’t work for FORM app, am i right? there is no way to add links.

well, there is link for form! but works differently, specially if single-record form, what you mean? wanna click on each form row to take you somewhere? i guess you mean the multiple records form which is useless otherwise how you will modify its values? if you mean the editable gird view then it is a from too, even if you managed to have it open other application on row click, what is the point!? it will lose its functionality to update the values then! not sure if i understood what you want to do exactly :slight_smile:

hi itsme3,
i need to create a PERSON app, where it has a detail app PERSON_INTERFACE which is a form-Editable-GRID app
so for each row added, it could be a PERSON with different type (client, lecture, employee, student, etc)
since i want to model a very dynamic PERSON app, where it could link to different app (CLIENT, LECTURE, EMPLOYEE, etc) by click on the row in PERSON_INTERFACE based on their PERSON_TYPE field (client, lecture, employee, etc)

that’s why i need a editable-form-GRID to achieve it rather than a normal GRID

the outlook is like

ADD BUTTON
PERSON_TYPE | LINK
Student | Go To
Employee | Go To

even-though, grid can serve you better, i believe. just create your table and the detailed table related to that with person_id, then create application_link to a single-form to edit that data… and in grid, you can activate the detail feature to see all the person information, no need for Go To
now, create a new button in SC, not in database {linkto} and link it from field_link to another grid for example to show you some other related data in other table if you like… so on for other fields

editable grid is a form its power is the entry point and the update point, not the linking and the navigation

that is what i see based on my understanding :slight_smile:

good luck

Mike