Jump to content

Global Fields and Portals


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

Recommended Posts

Is it possible to have a global field in a portal? For example, I want to be to log the progress of my project, with the progression bar I created as a global field. I want my users to be able to log the date and notate that 50% of the project is complete, with the progression bar at 50%. Then another record in that portal will show a different date with the progression bar being at 75%.

Link to comment
Share on other sites

To answer your question, yes you can put a global on a portal. However, I don't think that's what you want--unless you're intending to display a single progress bar for the whole system. That's what you'll get in this case. In other words, you'll see the same progress status for every project reported in the system, repeated once for each portal row.

What you need is some sort of calculation in the table of the portal that determines the progress of the project. The pseudo-code for this might be:

Case(DoneLevel = .1; "[*---------]"; DoneLevel = .2; "[**--------]"; DoneLevel = .3; "[***-------]"; ... etc. )

My example is meant to direct you toward where you want to go, so you'll probably want to do something different. Were you to put this calc on your portal, it would display the text appropriate to the DoneLevel for that project.

HTH,

David

Link to comment
Share on other sites

Basically, a global field is a single entry for the entire database (there are exceptions, of course, but don't worry about those right now). So, if you set a global field in one spot, it will be exactly the same everywhere else.

To create a cacluation field to do more of what you want, go into the Define Database screen, Define Fields tab. Select the table upon which your portal is based (say, Projects). Now, create a new calculation field called ProgBar. A calculation field figures out what it will be on the fly, so it needs to know what it will be. The calculation I offered makes use of the Case calculation to branch between different values of the value in DoneLevel, which would be a number field in this table that your staff would enter as they go. So, if a staff member put in .2 as the DoneLevel (I'd use a value list for this), then the Case statement would produce "[**--------]" as the result. You can read the help page on the Case statement for more on this. It might be easier to understand with a different formatting:

Case(

   DoneLevel = .1; "[*---------]"; 

   DoneLevel = .2; "[**--------]"; 

   DoneLevel = .3; "[***-------]"; 

   ... etc. ...

   DoneLevel =  1; "[**********]";

   "ERROR]"

)

Then, you put ProgBar on your portal line, and it will calculate based on its immediate context--i.e., it will look at the current Project record, see that its DoneLevel is .2, and return "[**--------]" on the line.

I hope that's clearer.

David

Link to comment
Share on other sites

This topic is 5774 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
 Share

×
×
  • Create New...

Important Information

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