Jump to content
Sign in to follow this  
Jukkie

Compare a field to a field in the data?

Recommended Posts

Hello,

I want to compare my edit (currentRecId) with the (CurrentRecID) value in the database.

I want this because if the field subscription did not change it may go directly to reply.htm page. But if the field subscription is different then de database I want to get a email with the changes in it and after the e-mail it should go to reply.htm.

Is this possible using CDML. I am thinking about using [FMP-if:] tags, but I still don't have the solution.

Greetings Jukkie,

Share this post


Link to post
Share on other sites

The "-recid" value for an "-edit" will always be the same as the returned "CurrentRecID". Hence, you need another method.

I assume that you have a "Changed" subscription or an "Unchanged" subscription? You can use some Javascript for this:

if (changed) { document.myform.elements["-format"].value = "email.html"; };

Good Luck.

Garry

Share this post


Link to post
Share on other sites

It might be worth looking at the [FMP-CurrentModID] CDML tag

The CDML Reference database has some info on its use.

Share this post


Link to post
Share on other sites

Hello Garry & Vaughan,

First to Garry. Your solution doesn't work for me because we have got a 250MB, 500MB, 1GB and so on. So a reseller can pick the storage needed for his customer. So there is no changed of unchanged subscription option.

I will look into the option Vaughan says.

A solution to this problem is: if the reseller want to change a record the first page only gives the all fields accept the subscript field to edit. If the reseller want to change the subscription field the reseller can click on the subcription link and change only the subscription field.

But I want do this in one page. So I gonne look into the [FMP-CurrentModID] CDML tag.

If there is anyone with an other good idea. Please let me know.

Greetings Jukkie

Share this post


Link to post
Share on other sites

Re: we have got a 250MB, 500MB, 1GB and so on. So a reseller can pick the storage needed for his customer. So there is no changed of unchanged subscription option

I guessed that, hence my "changed" was just a simple way of saying:

changed = False;

curr_subscription = "[FMP-Field: subscription]";

if (curr_subscription != document.myform.subscription.value) { changed = True; } ;

if (changed) { .....

However, I guess that you are not a programmer. So this method may not work for you.

Good Luck smile.gif

Garry

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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