Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Problem with lookup data being reset

A field called "activity_resources" is auto entered in the PROGRAM table from the RESOURCE table by a lookup dependending on the field "activity" that the user selects.

A user can change the text state of field "activity" using check boxes, this text state is coded in the calc of the field "activity" e.g.

case(

PROGRAM::To Change = "Ch";

TextColor(PROGRAM::Activity ; RGB(255; 50; 50));

PROGRAM::To Change = "N";

TextColor(PROGRAM::Activity ; RGB(50; 255; 50));

Evaluate(Quote(activity))

)

PROBLEM:

Each time a check box is checked the "activity_resources" are set back to the default and any changes are lost.

Is there a way to prevent this?

Your suggestions would be much appreciated, I've spent so much time trying to figure this one out ... without succeeding!

Thanks in advance

Posted

You mention a resource table but nothing you are doing has anything to do with the resource table. Have you mistakenly put the resource field on the layout instead of the activity field?

Posted (edited)

1) Instead of a Lookup, make sure you're using an auto-enter calculation that is set to "Do not replace field contents" (ie leave the box checked).

2) Evaluate(Quote(activity)) seems redundant for what you're likely doing. Just put activity in there.

Edited by Guest
Posted

Thanks for the responses

In response to 1)

The "activity" field is a line in a schedule for a specific date and time, the activity can change if for example it's unavailable for that date and time therefore the resources would need to be set to the new activity. So my understanding is that the way to do that is using a lookup.

In response to 2)

I need the activity text to go back to black or not be a strikethrough if the check boxes are unchecked.

The reason the resources are resetting is because the textcolor()function does the same as if that activity was entered again for that date and time, as if it were a "new" activity.

Posted

Thanks for responding

The activity resources are dependent on the activity and the activity is affected by the textcolor() function. Therefore when I use the textcolor() if put the same activity in again as if it were doing it for the first time, thus entering activity resources from the lookup.

Posted (edited)

try;

Case(

PROGRAM::To Change = "Ch";

TextColor(PROGRAM::Activity; RGB(255; 50; 50));

PROGRAM::To Change = "N";

TextColor(PROGRAM::Activity ; RGB(50; 255; 50));

TextColor(PROGRAM::Activity ; RGB(0; 0; 0))

)

I modified the TOs to make it simple for me. so you may need to tweek it a bit.

Also, I don't think you need the Evaluate Function

HTH

Lee

Edited by Guest
Posted

Thank you

I also need to remove a strikethrough if that check box is checked as well as back to black. I can't get it to do both.

BUT that doesn't solves the problem of the resources resetting back to default???

Posted

Something in the calc is making the text disappear altogether when check boxes are checked together ... any idea what that could be?

Posted

The last line in my calculation makes it go back to black. Isn't that whay wanted?

If not, then I'm not understanding what you are trying to accomplish. Either attach a copy of the files (remove any sensitive data), or make a mock up of your files.

Lee

Posted

I really appreciate your time!

There are 2 issues:

Background:

We're building tour schedules in an office where program coordinators and bookers communicate through the system to build and book schedules simultaneously.

I have a "To Change" field that is a set of 3 check boxes.

ch-changes the activity field text to red (if there is a change)

N-changes text to green (if it's a new entry)

canc.-strikes through the text if it's a cancelled activity.

Issue 1) the Color and style of the text of the field activity:

When a user checks a box the text is affected, if all boxes are unchecked I need the text to go back to black with no style in this case a potential strikethrough (I can make all go back to black but can't remove the strikethrough as well)

This is what I have:

case(

PROGRAM::To Change = "Ch";

TextColor(PROGRAM::Activity ; RGB(255; 50; 50));

PROGRAM::To Change = "N";

TextColor(PROGRAM::Activity ; RGB(50; 255; 50));

PROGRAM::To Change = "Canc.";

TextStyleAdd(PROGRAM::Activity; Strikethrough);

//PROGRAM::To Change = "Canc." and PROGRAM::To Change = "Ch";

//TextStyleAdd(PROGRAM::Activity; Strikethrough);

PROGRAM::To Change = "";

TextColor(PROGRAM::Activity ; RGB(0; 0; 0) and TextStyleRemove(PROGRAM::Activity; Strikethrough));[color:red](Don't think and works here)

)

BIGGEST ISSUE 2)When I run the functions (when a user checks boxes) it relooks up the activity resourses that are based on the activity field losing any changes that a user has made. The activity is originally entered using a drop down from another table, it's as if the textcolor function or something in the calc reselects the same activity from the list as if it's new therefore resetting the resources back to the default.

Refer to original post for activity and activity resouces background

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