Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

filter based on accountname


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

Recommended Posts

  • Newbies
Posted

Hi, this is my first post in this forum.

I'm using FM 11 pro with IWP.

I have a portal filter based on a field that contains the current account name and the filter looks like:

my_portal_table::my_filed = Get (AccountName)

Using that in IWP it doesn't work. It seems that the filter use the name of the account that started the FM (not that of the web user). Infact the filter works fine if the web user and the FM user are the same, not otherwise.

Where am I wrong?

Thanks

Ginetto

Posted

"It seems that the filter use the name of the account that started the FM (not that of the web user)"

Get (AccountName) resolves to the Account Name that was used to login to the file.

What are you expecting? How does this differ from "the web user" account?

  • Newbies
Posted

When I open the file (and start the web sharing) I use an userid (let say john). After that I (or someone else) can access from a web browser using another account (let say bill). When an action operated by bill starts a script the function get(accountname) retrun bill (and not john, for sure).

Anyway it seems to me that if there is a filter on a portal based on get(accountname), the filter receive always john.

(I know that my English is not great and my knowledge about FM to, so I hope my request is clear enough).

Ginetto

Posted

Your description is clear, but we must be missing something. Let's confirm, what Accounts do you have in your system (File>Manage>Security)?

Posted

I'm thinking that your portal filter isn't setup correctly.

"I have a portal filter based on a field that contains the current account name and the filter looks like:

my_portal_table::my_filed = Get (AccountName)"

A field that contains the current account name? What do you mean? The field should contain the accountname that created the record, and should be populated as an auto-enter calc.

  • Newbies
Posted

What I'm trying to do is a sort of "temporary records" dedicated to a specific user-session. In a table (indicated as my_table) I create some records the are usefull just during the user session and just for him. Many users can use the application at the same time, so I need to show the right records to the right user. For that I "tag" each record with the name of the user.

The filter is used to show the records to the corrisponding user.

BTW I'm a newbie so what I have done is an explicit assignement to the field using get(accountname) at the creation time, as you correctly said I should have use an automatic assignement, but I think that doesn't change the problem.

Ginetto

Posted

One thing that is confusing me is that you are using the terms "user name" and Account Name, interchangeably and they are distinctly different to FM.

However you populate the field in the record that stores the account name really doesn't matter. If the record's AccountCreated field contains an Account Name of "Bob" and the user has logged in with the account "Bob," then the portal filter by Get(AccountName) should only show the "Bob" records.

Can you post a demo file?

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