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.

Featured Replies

hi!

i´m trying to compose some e-mails that i want looking more peronalised than they really are... what i want to do is to link the mail to different fields, name, age, and so on to get at more personal e-mail. example:

dear (insert_name),

happy (insert_age):th birthday. i am sending you a nice (insert_gift), hope you will enjoy it!

the problem is that whenever i go to insert something in the textfield it erases everything else in that field. i need to how to make it differ on the regular texts and the look_up feilds.

i know my morals on sending familymembers e-mails are of the shart, but hey, i just dont have any...

Hi Nils

As you have discovered you have to hit the text field only once or else you only get the last input.

One way you do this is set the message as a calc and to do what you want it would look like this

"Dear"&" "&insert_name & :paragraph:& :paragraph:"Happy"&" "&Insert_age&":th Birthday"

etc.....I am sure you get the picture.

It is a very rudimentary way of entering text into an email and it does not allow for text formatting etc but it might help you achieve something better than nothing

Phil

  • Author

thanks!

follow up q though. lets say i want the mail to go to an undefiend group of people, all of them greated in the mail. i got a list of people that i get from a field in a portal, the number of people vary. i want it to put in all the names untill theres no more names to insert. do you get what im trying to do? example:

dear "& people_name1, people_name2, people_name3... and so on untill my list is up&"

you are all invited to a party tonight...

they are ofcourse not named "name2" and so on, they are simply entries in my contact table, but i still want them allt o show up in the mail.

any ideas?

...That sort of ruins the whole purpose of individualizing the mail. But anyway, you would have to collect all the names via a looping script first i.e.:

Loop

Set Variable[$$names ; $$names & insert_name & ", "]

Exit Loop If [Get(RecordNumber) = Get(FoundCount) - 1]

Go To Record [Next]

End Loop

Go To Record [Next]

Set Variable[$$names ; $$names & insert_name]

Then in the message you could specify

"Dear " & $$names & "¶¶" & "You are all invited to my party tonight¶¶Sincerely " & sign_off_field

  • Author

k... where do i load the scrip? should i do it in the button config before i sen the mail? sort of:

execute script"mail_all"

send mail

is this the right way to go?

Hi Nils

Yes, that is it basically. Set up a script which sets a global field (or perhaps a variable maybe - I must try that)anyway set up your field/variable to contain the text that you wish to be displayed in your email and then issue the send email step.

At that point you can nominate the message in the email to be a field ie your text field (or variable if that is possuble)

HTH

Phil

  • Author

i think i have to explain something because i still cant get the code (Genx) to work...

im getting the names from a single field in a diffrent table, ive just modified the field to repeat 20 times and i need all the post out of that field...

besides when i use the " & $$names &" command in the email, nothing shows up at all?

... you should be using content & $$names & content

Im not 100% variables will work (only around 95%) - And repeating fields, don't ask me about them, i just choose to be completely ignorent of them even though while they may still have a couple of uses here and there, they are said to be remenants of pre-relational filemaker.

Regarding the use of variables here though, there is no reason it shouldn't work.

Variables are good for everything except getting user input, and displaying things on layouts.

  • Author

thanks.. ill try to work something out, not completely sure how to get it to work...

by content i assume you mean the field content which in this case would be "family_name"?

No no no no, i mean just other content in your email...

For example this could be your email:

"Dear everyone, I am writing this email in regards to the party coming up on " & Parties::Party_Date & ". The following people are invited: " & $$names & ". Thank you for your attention. Regards, Willace"

The steps would basically be:

Run the above mentioned script first to set your variable $$names.

Then simply specify your e-mail to whomever you want using the step send-mail - specifying the email as a calculation and specifying $$names as part of that calculation - where ever you want that list that the script generates to appear.

Hope this helps

  • Author

im still not getting it to show the names!!!

currently im just getting a blank where the names suppose to be. it think it might have something to do with the Get(CountRecords) thing since im not really using records. i want it to count the entries in a specific field "people_names"...

gah... i bet this is just a simple problem, seems like it, just feels like im overlooking something...

Edited by Guest

"Get(CountRecords)" ??

"not really using records"??

I think you might be overlooking to use some records!!

How do you expect to get any names if you are not using any records ?

Phil

Phil's got a point..

Get(CountRecords) isn't a function as far as i know. You might mean Get(RecordCount), but if you use that, then you are restricted to operating with all records, not being able to narrow down using a found set. Further, you have to add a show all record step into the script mentioned above.

Please make your scenario a bit clearer.

Cheers,

~Genx

  • Author

sorry, i ment Get(FoundCount)...

ill try to clear things up a bit.

i got a repeating field called people_names, in a table called people_groups. people_groups consists of diffrent records, one for family, one for work, and so on (thats not really important).

i want to collect all the names from this repeating field and stick them into the mail. thats my problem...

im attaching my file (should have done that long time ago... sorry :) hopefully you can help me using it...

thanks!

people_mail.zip

... Rethink your structure, repeating fields are not good for this pretty much full stop. Just use a related structure, much easier.

I don't understand why you've used a relationship in one section and gone repeating field in the other one.

Point is, if your desperate to use repetitions, use a similar script to the above, but instead loop over it using GetRepitition() function.

  • Author

all i get the GetRepetition() function to do is still just to list ONE name... thats whats bothering me, why cant the darn thing just collect all names?

GetRepetition(if (IsEmpty(people_names) != true) $names;$$names & ", ")

is this anything close?

Not exactly, because you want to loop through the repitition numbers up to twenty, it gets a bit more complicated, because you have to tell it what repitition you want it to retrieve the info from.

So we have to specify an additional variable, in this case perhaps $i .. why not.

Then we use something similar to the following (keep in mind i don't deal / like to deal with reps so you have to test this yourself):

SetVariable[$$names ; ""]

SetVariable[$i ; 1]

Loop

SetVariable[$$names ;

Let[color:red](GetRepetition(YourNamesField ; $i) = rep ;

If[color:blue](IsEmpty($$names) and IsEmpty(rep) ; "" ;

If[color:green](IsEmpty($$names) and not IsEmpty(rep) ; rep ;

If[color:purple](not IsEmpty(rep) ; $$names & ", " & rep ; $$names[color:purple])

[color:green])

[color:blue])

[color:red])

]

Exit Loop If[Get(ActiveRepetitionNumber) = 20]

SetVariable[$i ; $i + 1]

End Loop

  • Author

sorry, didnt work :

thanks for the example though... ill try to build something round it, looks like your are on the right track though...

You for serious? I thought that would work... instead of all that junk i put in the middle try just putting

SetVariable[$$names ; $$names & GetRepitition(YourNameField ; $i ) ]

repeating fields are not good for this pretty much full stop

Yes indeed subtleties are needed here, since our list mom(s) exercise of justice (not wearing their swords in vain) is not entirely based on common sense, only ethnical common sense i'm afraid, and borrows from a notion of being occupied (St. Paul and Hobbes) ...you have to realize that the anglosaxon successes as such, so far have been driven by exactly this paranoid fear for loosing punters, but if this REALLY qualifies an urge use of codified messages - is a standing dispute between the mom(s) and your's sincerly : :P

--sd

Nope soren, you've done that whole think where you've lost me again :. I do remember the hobbes though :P, codification i understand in a random legal sense, but nope. Over my head :P.

  • Author

sorry dude... that didnt work either... you have any solutions to this problem if i used something else than repeating fields? i really dont wanna give up my idea (cause it felles like the darn computer wins :) ) but as everything this thing has got a deadline...

please keep posting ideas on the repeating field (im gonna call up filemaker support and get annoying aswell), but if you could provide me with a substitute i be gratefull!

  • Author

solved it... he he he

setvariable[$$i; count(people::names)]

setvariable[$$k; $$i]

loop

setvariable[$$i; people::names[$$k]]

setvariable[$l; $l &", " & $$j]

exit loop if [$$i=$$k]

setvariable[$$k; $$k +1]

end loop

voila!

The problem you'll run into is if a repetition is empties along the way, your Count( makes you stop in a wrong place!

I think you would better off with a textfield instead, but you can drag the horse to a waterhole, but you can't force it to drink! So you would need to make a test with perhaps this CF:

http://www.briandunning.com/cf/450

...to establish blanks along the scripting!

But the adresses are bound to be in a related table anyway, so why can't a Substitute(ValueListItems(Get(FileName);"YourDynamicList");"¶";", ")

...or a found set, dealt with this way:

http://www.nightwing.com.au/FileMaker/demos8/DynamicSummary.zip

Here poke into the CF's and change the GetValueSet( function to use comma-space as delimiter instead

GetNthRecord ( Field; StartValue ) &

If(IsValid(GetNthRecord ( Field; StartValue + 1));

¶ & GetValueSet(Field; StartValue + 1))

...or just make the Substitute( as I did with ValueLists(

--sd

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.