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.

Access an URL variable

Featured Replies

Imagine I have this link on a page:

http://xxx.xxx.xx.xx/FMPro?-db=Database.fp5&-lay=Web&-error=errors.htm&-OP=gte&TIME=Afternoon&-max=10&-format=list.htm

how can I show in the linked page something like this

****************

on the afternoon we have:

record1,2,3,4.... (all the records go here)

***************

I know how to show the records from the DB but not how to extract the variable time=afternoon which is an URL variable.

Does anyone knows? thanks in advance

  • Author

The fact is that I have the link done. What I need is to abtain the variable in the URL in the page which the link refers to

But thanks anyway

CDML is not capable of doing that. It is one of the many very disappointing aspects of CDML. You'll need regular middleware to achieve that functionality, such as PHP, Lasso, ASP, etc.

Using PHP, you would get the value from the following statement:

print $_REQUEST['TIME'];

This would output "Afternoon" to the browser.

One method is to use the "[FMP-FindValueItem]" tag:

From the "CDML Reference" database

What it does

[FMP-FindFieldItem] is replaced with the field name that was part of the find request that created this page.

[FMP-FindFieldItem] must be placed between the [FMP-CurrentFind] and [/FMP-CurrentFind] tags.

Syntax

[FMP-FindFieldItem: Encoding ]

Parameter(s)

First parameter (optional): Encoding. Use one of the following reserved words:

Raw - Don't perform any encoding

URL - Perform URL encoding

HTML - (default) Perform HTML encoding

Syntax example(s)

Return the current find criteria using an HTML file

Current find request is:<br>

[FMP-CurrentFind]

Field: [FMP-FindFieldItem], Op: [FMP-FindOpItem] Value: [FMP-FindValueItem]<br>

[/FMP-CurrentFind]

<!-- After processing it could look like:

Current find request is:

Field: First Name, Op: begins with Value: Joe

Field: Last Name, Op: equals Value: Doe

-->

Some other CDML options may exist, such as Tokens.

Good Luck.

Garry

Whoops, let me eat my words! crazy.gif Good call Garry!

  • Author

Well Mariano, if i'm not wrong [FMP-FindValueItem] does return ALL of your URL variables so it doesn't do the job as I only want to show one. Combining [FMP-FindValueItem] with javascript should do the work. I'll try it later. If it works I'll post it here

As Garry said, Tokens are used to transport variables around between pages in CDML.

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.