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

Hello All,

[color:"red"] [color:"blue"] confused.gif

We are developing an web interface for our own administration an now we came up with the following problem:

We made one Database file called relations.fp5 where there is various information on the client who is subject to this record.

In this Database file we refer to another Database file ( we made a relational database system) called contacts.fp5 where the user is able to select various contact persons that in this case is related to the company name.

We seem to be able to display the requested data in that particular record but are not able to create / edit these fields

So, we can display the record what has been build up from various other database files in one HTML page, but are not able to store and edit file back into the

separate database files.

For example:

This works:

[FMP-Field: Contacts::Email]

But this doesn't seem to work:

<input type="text" name="Email" value="[FMP-Field: Contacts::Email]"

Does anybody knows which syntax we can use for this?

with respect,

Nick.

Did you tried that on the same page? One is working, the second one not?

This will create a new related record:

<input type="text" name="Contacts::Email.0" value="[FMP-Field: Contacts::Email]">

This will allow you to edit the related records:

[FMP-Portal:Contacts]

<input type="text" name="Contacts::Email.[FMP-CurrentPortalRowNumber]" value="[FMP-Field: Contacts::Email]">

[/FMP-Portal]

Good Luck.

Garry

  • Author

Dear Gary,

First of all thanks a lot for your quick and accurate reply,

It's all working just fine except for two things and maybe you are able to help me once again with your knowledge of Filemaker?

When we want to make a new related record

Using this statements:

<input type="text" name="Contact::Contactpersoon.0" value="">

<input type="text" name="Contact::Telefoon.0" value="">

<input type="text" name="Contact::Email.0" value="">

<input type="text" name="Contact::Extra info.0" value="">

This works but only when there are no related records already.

When there is a record already the error message appears that the fields do not have a unique value.

So I tried to give the fields the value .100 just to see what happens

<input type="text" name="Contact::Contactpersoon.100" value="">

<input type="text" name="Contact::Telefoon.100" value="">

<input type="text" name="Contact::Email.100" value="">

<input type="text" name="Contact::Extra info.100" value="">

And then it works only now for every field a seperate record is created e.g.:

1 Contact

2 Telefoon

3 Email

4 Extra Info

instead of the expected:

1 Contact Telefoon Email Extra Info

Are you able to say which statement we have to use?

Also

How does one delete such a record?

I was thinking something like this:

<a href="FMPro?-DB=Relaties.fp5&Format=ContactDelete.htm&lay=Alegemeen&amp;-RecID=[FMP-CurrentPortalRowNumber]" -delete">

But this didn't seem to work?

Can you tell me what I'm doing wrong?

Thanks again for your help!

with respect,

Nick.

Here is a simple test I've just tried:

<body>

<form method="POST" action="FMPro">

<input type="hidden" name="-db" value="combotest.fp5">

<input type="hidden" name="-lay" value="combo_portal">

<input type="hidden" name="-format" value="hworldlist.html">

<input type="hidden" name="-recid" value="[FMP-CurrentRecID]">

[FMP-Record]

[FMP-Field: name]<br>

[FMP-Portal:work_periods]

Line ID: <input type="text" name="work_periods::combo_line_id.[FMP-CurrentPortalRowNumber]" value="[FMP-Field:work_periods::combo_line_id]">

Text: <input type="text" name="work_periods::some_txt.[FMP-CurrentPortalRowNumber]" value="[FMP-Field:work_periods::some_txt]"><br>

[/FMP-Portal]

New Line ID: <input type="text" name="work_periods::combo_line_id.0" value="">

New Text: <input type="text" name="work_periods::some_txt.0" value=""><br>

[/FMP-Record]

<input type="submit" name="-edit" value="Edit">

</form>

</body>

It worked fine for adding and editing portal rows.

A couple of things to look for:

- The portal on the Layout has scroll-bars;

- The portal contains the Field names needed.

To help with the deletion of Portal Rows I added a Calculated field, in the related file, which displays the RecordID - "Status(CurrentRecordID)". I then use this to assign the "-recid". For example:

<a href="FMPro?-DB=Relaties.fp5&Format=ContactDelete.htm&lay=Alegemeen&amp&-RecID=[FMP-Field:Contact::myRelRecID]&-delete">

All the best.

Garry

  • 3 weeks later...
  • Author

Hello Gary thanks again for your excellent help everything works except for the creation of new records in the portal.

This is what i was using:

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-RecID" VALUE="[FMP-currentrecid]">

<INPUT TYPE="hidden" NAME="-lay" VALUE="test">

<INPUT TYPE="hidden" NAME="-db" VALUE="test.fp5">

<INPUT TYPE="hidden" NAME="-format" VALUE="testeditreply.htm">

<!--edit-->

[fmp-portal:test2]<br>

IDPortal<INPUT TYPE="text" NAME="test2::IDPortal.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::IDPortal]">

VN <INPUT TYPE="text" NAME="test2::VN.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::VN]">

AN <INPUT TYPE="text" NAME="test2::AN.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::AN]">

<a href="FMPro?-DB=test2.fp5&-Format=testeditreply.htm&lay=test2&-RecID=[FMP-Field:test2::IDPortal]&-delete">weg</a>

<!-- einde edit--> [/fmp-portal]

<p>[FMP-Record]<br>

VN <INPUT TYPE="text" NAME="test2::VN.0" size="20" value="">[FMP-Field: Portalrownumber][FMP-CurrentPortalRowNumber]

AN <INPUT TYPE="text" NAME="test2::AN.0" size="20" value="">[FMP-Field: Portalrownumber][FMP-CurrentPortalRowNumber]

<!--einde nieuw-->

<p>[/FMP-Record]<br>

<INPUT TYPE="reset" VALUE="Clear Form">

<INPUT TYPE="submit" NAME="-edit" VALUE="Edit Record">

</p>

</FORM>

And when i try to create the new portalrow the first one goes well but when I do another one something happens nl:

the first field is pasted correct in a new portalrow but the second field is pasted in the first portalrow instead of the new one thus leaving the second field on the new portalrow blank. This looks something like this:

portrow 1: 2

portrow 2: 1 2

where 1 is the data from the first input and 2 from the second input as you can see the second field from the first input dissappears completely.

Can you tell me what is causing this behaviour?

with respect,

Nick

Nick,

The only thing I can see is the position of the "<p>[FMP-Record]<br>". This should be before the [FMP-Portal] tag.

However, I'm not sure if that would make any difference.

I just double-checked the example code I use for testing and it is working fine with two fields being inserted into the new Row.

See how you go with moving the [FMP-Record] tag.

Good Luck.

Garry

  • Author

Hello Garry,

I tried moving the [FMP-Record] tag but it didn't work,

maybe it is possible to always have an empty extra record at the end so instead of creating a new one you just edit the empty one?

kind regards,

Nick

Nick,

I have just tested your code with a test.fp5 and a test2.fp5. It works fine!

I used this URL:

http://localhost:1154/FMPro?-db=test.fp5&-lay=test&-format=test.html&-findany

to call this code (called "test.html"):

...<body>

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-RecID" VALUE="[FMP-currentrecid]">

<INPUT TYPE="hidden" NAME="-lay" VALUE="test">

<INPUT TYPE="hidden" NAME="-db" VALUE="test.fp5">

<INPUT TYPE="hidden" NAME="-format" VALUE="test.html">

<!--edit-->

[fmp-portal:test2]<br>

IDPortal<INPUT TYPE="text" NAME="test2::IDPortal.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::IDPortal]">

VN <INPUT TYPE="text" NAME="test2::VN.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::VN]">

AN <INPUT TYPE="text" NAME="test2::AN.[FMP-CurrentPortalRowNumber]" size="20" value="[FMP-Field:test2::AN]">

<a href="FMPro?-DB=test2.fp5&-Format=testeditreply.htm&lay=test2&-RecID=[FMP-Field:test2::IDPortal]&-delete">weg</a>

<!-- einde edit--> [/fmp-portal]

<p>[FMP-Record]<br>

VN <INPUT TYPE="text" NAME="test2::VN.0" size="20" value="">[FMP-Field: Portalrownumber][FMP-CurrentPortalRowNumber]

AN <INPUT TYPE="text" NAME="test2::AN.0" size="20" value="">[FMP-Field: Portalrownumber][FMP-CurrentPortalRowNumber]

<!--einde nieuw-->

<p>[/FMP-Record]<br>

<INPUT TYPE="reset" VALUE="Clear Form">

<INPUT TYPE="submit" NAME="-edit" VALUE="Edit Record">

</p>

</FORM>

</body>

</html>

I changed the Format file to be the same file; i.e. test.html.

The "[FMP-Field: Portalrownumber][FMP-CurrentPortalRowNumber]" tags are of no use where they are currently located.

Also, I've attached the two files I used.

Good Luck.

Garry

test.zip

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.