stan111 Posted November 29, 2018 Posted November 29, 2018 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!
comment Posted November 29, 2018 Posted November 29, 2018 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. 1
stan111 Posted November 29, 2018 Author Posted November 29, 2018 (edited) 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 November 29, 2018 by stan111
comment Posted November 29, 2018 Posted November 29, 2018 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).
stan111 Posted November 29, 2018 Author Posted November 29, 2018 (edited) 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 November 29, 2018 by stan111
comment Posted November 29, 2018 Posted November 29, 2018 Enter Layout mode and double-click the portal - you will see it under Format. Note that this option is unavailable in master-detail layout.
stan111 Posted November 30, 2018 Author Posted November 30, 2018 (edited) 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 November 30, 2018 by stan111
comment Posted November 30, 2018 Posted November 30, 2018 What trick? There is no trick here. Please read the help on script parameters and defining buttons.
bcooney Posted November 30, 2018 Posted November 30, 2018 Are you aware of how to use the Find command? Scripting buttons to go to specific records isn't often needed. Use Find.
Recommended Posts
This topic is 2464 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 accountSign in
Already have an account? Sign in here.
Sign In Now