Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CS for Record Arrow graphics

Featured Replies

Almost every table needs record-arrow navigation. I decided to (hopefully) simplify the idea, utlizing Custom Function so that the required calculation in each table would be easier and could be just one calculation for all four arrows. I have attached my simple idea - Preferences table containing the Arrow graphics and a Customer table. I will be implementing this into approx. 25 tables once I get my head clear on it.

This will be networked and I need to be sure my use of globals will work. I would hate to have this break when presented in multi-user. I tend to think that even more of the calculation can be moved to the Custom Function, but I am unsure how to accomplish that. I have placed each calculation repetition independently so script could be attached directly to each Arrow calculation.

And, is there a way to stop the black flash of script execution if no button is visible? I dislike the ability to still click that spot and have it execute at all.

I may be over-complicating this whole idea. Ideally, the calculation container in each data table (called ArrowBar) would only contain Custom Function 'Arrow Bar'. As you will see, I still have it broken up too much -- 1) as different Custom Functions for each Arrow and 2) Requiring Choose() within the data-table calculation. How best can I pull this together using Custom Functions? Or should I? Your wisdom would be appreciated. confused.gif

LaRetta

ArrowBar.zip

I would like it combined if you're going to be using this all over. By passing the rep-number into the custom function, you get a much nicer calculation in define fields.

See MoreArrows field in the attached.

  • Author

Bang Zoom Perfect - of course! And again, The Shadow has come through for me!!! Thank you so much! smile.gif I'm going to figure out repetitions yet. I notice you don't have yours unstored!: Why did I think it needed to be unstored? I guess not! Thanks again. wink.gif

Wow. Just your Arrow Custom Function and a very simple ArrowBar calc in each table. It doesn't get easier than that.

LaRetta

  • Author

Hey Shadow! I didn't take into account working with a found set also. If (on a found set) going to the last record, the Next and Last arrows don't disappear.

I modified it (adding the bold) but it still won't work (on found set, last two arrows still show). blush.gif

If(

Get ( TotalRecordCount ) > 1 or Get ( FoundCount ) > 1;

If ( Choose( repNum-1; Get ( RecordNumber ) > 1; Get ( RecordNumber ) > 1;

Get ( RecordNumber ) < Get (TotalRecordCount) or Get ( RecordNumber ) < Get (FoundCount); Get ( RecordNumber ) < Get (TotalRecordCount) ) or Get (RecordNumber) < Get (FoundCount);

Preferences::RecordArrow[repNum]

)

)

Any idea how I can account for all records or found sets? smile.gif

LaRetta

When you don't have a found-set, Get(FoundCount) and Get(TotalRecordCount) are equal.

You can just change the calculations to always use Get(FoundCount) and it seems to work fine.

I think you DO want this calculation Unstored, I just did a quick test and it worked, but it would fail as soon as I made a new record, but I didn't try that.

  • Author

After your post, I changed all 25 table calcs by unclicking 'Do not store' or so I thought. Maybe I missed one. This took some time to recalculate. Then when it didn't work, I tried changing another table calc to unstored and it still didn't work. I'll bet I missed a table originally. Anyway, this table was Unstored and I will check the rest of them in the morning. blush.gif

Time for a glass of Merlot and some music. Obviously my FM brain has already retired for the evening. Thank you, Shadow. wink.gif

Update: I can't read very well. You said it SHOULD be Unstored!! Okay, I'll change them all back ... in the morning. I changed the one table to 'Unstored' and changed the TotalRecordCount to FoundCount and it works perfectly. I can't see very well either - I hadn't noticed you attached a demo. laugh.gif

L

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.