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.

Help with Array and Inline calc

Featured Replies

Hi All,

Just starting playing around with Lasso. I've downloaded the demo and have been learning quite a bit along with the help of Duncan Cameron's book - and the neat LockIt login system.

I'm at a point now - and I'm stuck - and looking for some help.

I have a database that has a jobs list with each record tagged with a unique 8 digit code.

In my other database, I have a list of users with their 8 digit code. There is also a 'super-user' field that I will key in all codes that this user also has access to.

On my webpage, I have 2 links: "My Jobs" (when clicked shows the user a list of their jobs) and "All Jobs" (when clicked it shows them all the jobs tagged with the available codes in their 'super-user' field.

I'm stuck getting the latter part to work. If I hard code it like so:

[inline: (Action_Params),

-Database='Jobs',

-Table='Jobs_List',

-Operator='cn', 'Eight_Digit'='11111111', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='22222222', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='55555555',

-KeyField='Internal Record ID',

-MaxRecords=10,

-Search]

It works as planned.

I had hoped to load the codes from the super-user field into an array and then create a loop to generate the code between the -Table and -KeyField. My array code is working correctly as it will give me the codes from the field.

I can't seem to get my code to work correctly for the loop. Here is my attempt:

[inline: (Action_Params),

-Database='Jobs',

-Table='Jobs_List',

(Loop: $MyArray->(Size))(-Operator='cn', 'Eight_Digit'=(Output: $MyArray->Get:(Loop_Count)), -OpLogical='OR',)(/Loop)

-KeyField='Internal Record ID',

-MaxRecords=10,

-Search]

I need the loop to generate this code:

-Operator='cn', 'Eight_Digit'='11111111', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='22222222', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='55555555',

Assuming there are 3 codes in the super-user field.

Any help would be great... I've been trying to get this to work for 2 days now... Thanks for your time.

- Jerremy

  • Author

Hi again all,

I'm about to jump out the window...

I can't seem to find anything on creating some dynamic inlines... I don't even know if it's possible.

What I'd like to do is, based on a field in my database, create a few dynamic lines in my inline to reflect the number of values in the field.

So, for example, in my field, if there are 3 passwords:

11111111

22222222

55555555

I'd like to have some type of code in my inline to give me:

-Operator='cn', 'Eight_Digit'='11111111', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='22222222', -OpLogical='OR',

-Operator='cn', 'Eight_Digit'='55555555',

...and have that be part of the inline.

Hard coding that into the inline gives me the results I want. However, I can't seem to dynamically generate it in the inline.

I've even made a field in my DB and pasted that in, then made it a variable, and called it from the inline - and that doesn't work... I can't figure out why that won't even work.

Is this even possible?

Am I going about it the wrong way?

Any help would be great.

Thanks!

- Jerremy

I am probably far of your problem, but OR are always problematic with FileMaker. And you are even mixing CN with ORs.

But maybe I am wrong...

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.