@DbColumn works on v6.5.1 but not v7.0.1?

Hi all,

I have this code in the click event of a button:

(I have verified that ServerName and StoreCardAddr are correct)

@If(ServerName = “”; tmpDB := “storecd.nsf”; tmpDB := @Text(StoreCardAddr) + “storecd.nsf”);

tmpProf := @Prompt([OkCancelList]; “Territory Assignment/Manager Selection”; “Please select the appropriate Assignment/Territory Manager :”;“”;@Unique(@DbColumn(“”:“NoCache”;ServerName : tmpDB;“ProfLookup”;1)));

@If(@IsError(tmpProf); @Prompt([Ok]; “tmpProf”; “error in dbColumn statement”); @Prompt([Ok]; “tmpProf”; “No Error”));

The @DbColumn lookup works on my client (6.5.1) but it won’t work on the users’ clients (7.0.1).

When this code gets executed on version 7.0.1, the @Prompt does not even pop up and @IsError(tmpProf) returns true. So maybe the prompt isn’t coming up because the @DbColumn inside of it is getting an error? But why does it work on the earlier version?

Can someone help me?

-Thanks

Subject: @DbColumn works on v6.5.1 but not v7.0.1?

add a prompt to see what the value of tmpdb is resulting to on each client.

Subject: RE: @DbColumn works on v6.5.1 but not v7.0.1?

Yeah thank you for your response. I have done this and the value is correct for both test cases.

when the DB is local, it is in the root.

tmpDb = “storecd.nsf”.

when it is on a server, it is in a directory

tmpDb = “salesforce\storecd.nsf”

Subject: RE: @DbColumn works on v6.5.1 but not v7.0.1?

not sure if this matters but typically when a folder hierarchy is used it needs double fwd slash in order to work when done in formula language:

“salesforce\storecd.nsf”

but not sure why this would make a difference from 1 version to another though.

Subject: RE: @DbColumn works on v6.5.1 but not v7.0.1?

I think I have found a solution to my problem:

I then changed the view “ProfLookup” to not allow duplicates. I did this by checking the checkbox “Generate unique keys in index” in the properties dialog of the view.

Then I changed the following bit of code to run without the @Unique function:

So

@Unique(@DbColumn(“”:“NoCache”;ServerName : tmpDB;“ProfLookup”;1))

is now

@DbColumn(“”:“NoCache”;ServerName : tmpDB;“ProfLookup”;1)

After doing this, my problem disappeared!

So I guess the problem was with the @Unique function?