Jump to content

Compare a field to a field in the data?


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

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,

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

This topic is 7245 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.