Jump to content

assigning scripts to multiple buttons


This topic is 1968 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, 

I created a dashboard with a bunch of buttons, attached script to every button, which allows me navigating to specific record of the Products table. Basically, every script is the same, with minor changes (only record ID field changes).

The process of creating a script to every button is a very time consuming as I need to write a script that  a) goes to layout b)finds the certain record 

1 "Step: Go to Layout
    Layout: Products

 
2 Step: Perform Find" 

 

Is there a way to simplify the task?

 

Thanks!

Link to comment
Share on other sites

First, you could have used a single script and define each button to pass a different parameter value to the script.

But even so, creating a button for each product is tedious and redundant. You already have a record for each product in the Products table - why don't you take advantage of that? Show the products in a portal or in list view, and have a button take you to a more detailed view. If you are using a master-detail layout, with a portal to the same table*, you don't even need the button: simply clicking into a portal row will bring you into detailed view of the clicked record.

--
(*) Requires version 17. Please update your profile to show your version and OS.
 

  • Thanks 1
Link to comment
Share on other sites

Thank you, mr. comment!

I created a portal and assigned a button to a portal record with the script attached "Go to related record". Works fine!

Is it possible to have portal records rearranged and shown not as a row, but as a cage?

Edited by stan111
Link to comment
Share on other sites

A cage? Do you mean a grid? It's sort of possible:  if you have a portal showing say 5 rows, you can duplicate it and set the duplicate's initial row to 6.  Add more duplicates and arrange them side-by-side ,increasing the initial row by 5 in each "column". But you must make sure you have enough rows in total to show all products (or add a scrollbar to the last portal).

Link to comment
Share on other sites

how can I set duplicate's initial row to 6? don't really understand 

 I'm not able to edit portal parameters as I am not using a referenced table. If I duplicate "Products table", than those parameters become active and I can set initial row to 6. But, the portal displays only one record and I don't know why.

Edited by stan111
Link to comment
Share on other sites

Quote

First, you could have used a single script and define each button to pass a different parameter value to the script.

how can I accomplish that trick, mr.Comment?

Edited by stan111
Link to comment
Share on other sites

This topic is 1968 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.