Jump to content

This topic is 7442 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a cdml page where users can enter a search term, which searches a fm5 database. I need to record the search term in a second database. How do I do it? I'm stumped. In Lasso it's a piece of cake, but cdml doesn't allow inlines...

/dan

Posted

Hi, D! Actually, CDML has inline actions, too but I'm not sure they work the same way. You might be able to do something like store the search term in a token from the input form and then use the token in both (1) an inline action search and (2) a write to your other db, though.

I think user garrycl (Garry Claridge) was helping someone with something similar not too long ago, but there's probably at least a few posts on this.

Inlines were added in FM5, I think...

------------- CDML REFERENCE DB ------------------

What it does

[FMP-InlineAction] allows the processing of multiple CDML requests during the processing of a single format file. The [FMP-InlineAction] tag takes as its parameters the URL-like format of the name value pairs for a CDML request. All further processing of the format file then continues as if the inline request started the processing.

When the [/FMP-InlineAction] is processed the request that was in effect previously is restored. Any -Format tags are ignored in the request. [FMP-CurrentError] contains the error result number of the last [FMP-InlineAction]. Any FMP-ContentMIMEType or FMP-Header tags inside any [FMP-InlineAction] tags are processed as if they were not inside any [FMP-InlineAction] tags.

Syntax

[FMP-InlineAction: Intratags ]

Parameter(s)

First parameter: Intratags{intratag parameter}

Syntax example(s)

<!-- List the employees named Doe in the current database -->

[FMP-InlineAction: -db={CurrentDatabase}, -lay={CurrentLayout}, last name="doe", position="Software Engineer", -find] [FMP-Field: first name] [FMP-Field: last name] [/FMP-InlineAction]

<!-- Send a mail message if a cookie was never set -->

[FMP-If: CurrentCookie: hasseen .ne. yes]

[FMP-InlineAction: -db=dbname, [email protected], [email protected],

-mailsub=New User, -mailhost=17.17.17.17, -mailformat=newuser.txt, -view]

[/FMP-InlineAction]

[/FMP-If]

<!-- Log page hits in another database -->

[FMP-InlineAction: -db=log.fp5, -lay=web, time="{CurrentTime}", date="{CurrentDate}",

page="This page!", browser="{ClientType}", ip="{ClientIP}", -new]

[/FMP-InlineRequest]

Posted

Interesting, I jumped on the Lasso bandwagon long enough ago that I never noticed that CDML had added inlines. Yay. So, I added that inline, and it's writing to my database, but not parsing the search term correctly. Apparently it doesn't like the curly braces format, but that's what I've seen in all the discussions on the thread of inlines (I'm getting {FMP-FindValueItem} added to the field, rather than the value itself). Here's my code:

[FMP-CurrentFind]

[FMP-InlineAction: -db=ela_hits.fp5, -lay=web, search_term="{FMP-FindValueItem}", -new]

[/FMP-InlineAction]

[/FMP-CurrentFind]

Do I need to declare tokens somewhere along the way instead of trying ot drop in FMP-FindValueItem?

/dan

Posted

Problem solved. After much trying to do figure out another way to do this, I discovered that intratag syntax requires dropping the fmp- prefix. So my code started working properly when I replaced {fmp-findvalueitem} with {findvalueitem}.

Thanks for pointing me in the right direction, Steve.

/dan

Posted

Hi, Dan! Wow... you did get in on Lasso early if it was before FM5. I remember there being issues with the CDML intratag braces but I don't ever remember seeing much documented on it. Now that CDML has gone bye-bye, I suppose it's almost a moot point now, though.

Glad it all worked out!

--ST

This topic is 7442 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.