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 Code ... replace appendNth Calculation

Featured Replies

<?php echo $infoData['FullName'][0];?>

<?php echo $infoData['Title'][0];?>

<?php echo $infoData['Group'][0];?>

Contact Details

Direct dial: <?php echo $infoData['Telephone'][0];?>

Email:

<?php echo $infoData['Email'][0];?>

Other <?php echo $infoData['Group'][0];?> Members

<?php

foreach ($infoResult['data'] as $key => $infoData)

{

?>

<?php echo $infoData['TeamMembers'][0];?>

<?php

}

?>

Edited by Guest

  • 2 weeks later...

ZP

I'm going to assume all your team members are related on Group...

It would seem that after you do your first query using the UserID, you would want to do a second query on that user's Group to pull all those Group/team member records (if not Group, then use the correct linking field).

You should be able to have multiple results simultaneously. The first one is being stored in $infoResult, the second might go into $teamResult.

Once you have that, just loop through the $teamResult array, echoing the name fields as you go.

You may find it helpful to get a better little understanding of how these php arrays work and what you can do with them. The php manual online is an excellent resource. You could start your reading here: http://us3.php.net/manual/en/language.types.array.php

Happy holidays

Don

  • Author

Thanks Don

Yeah, I will have to do a bit of reading to wrap my head around PHP and advance my knowledge. I seem to be able to get the basics but that is as far as I go.

I will try what you suggested and also RTFM B)

thanks again

Zippy

Z

Another thing to look at in the manual is the section on Classes. This is a much more difficult topic (for me at least) but it would help to understand that fx.php is a class and you can create simultaneous, independent objects from the class... well, don't count on my use of the terminology associated with classes.

The O'Reilly book, PHP in a Nutshell has also been a useful get-your-feet-on-the-ground resource for me.

Truth is, I can barely understand anything about classes from the online manual. I can at least understand general principles when I read the O'Reilly book.

Since you're already dipping into php, I'll give you my standard recommendation of Scodigo's SmartPill. This inexpensive plug-in gives you PHP in the filemaker calculation engine. I can't begin to tell you all the amazing things I do with filemaker since I added this one plug-in.

Don

Classes are just an encapsulated set of functions, variables and behaviors - It takes a while to get this straight in your head, but trust me, the benefits are amazing once your code starts becoming clear and consistent on the page, but more so when you start reusing your code b/w projects ...

For Class theory in general, look up PHP OOP - aka Object Oriented Programming - its much more of a reality with PHP 5 than it ever was with 4.

This is a pretty in depth explanation:

http://www.pretechno.com/i/object-oriented-approach-oops-in-php.html

Edited by Guest

genx

thanks for the link. I have a feeling of the benefits that will come, and I have been able to lift classes, dump them into the fm calc engine (using smartpill) and use them... That's not the same as really knowing them. Cookbooking is good though!

I found a php vCard read/write class the other day. I have (on my to-do list) a project to use it as a basis for integrating the Apple AddressBook app with FM.

Thanks again for the link. Reading these explanations from various writers is helpful.

Regards,

Don

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.