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

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

Recommended Posts

Posted

I'm trying to create a music schedule that will view all musicians scheduled to play from todays date and all dates in the future, in a portal.

My tables are Music Schedule and Music Schedule line item.

My relationship is (Music Schedule) "Todays Date" greater or equal to (Music Schedule line item) "Date".

I want to be able to schedule musicians in the portal, but when I type in the future date in date field, it reverts back to todays date.

Thanks for your help!

Posted

Wouldn't you want your relationship to be Schedule::Date <= LineItem::Date? If you use >=, then the portal will show all dates up to Date, inclusively.

Posted

You are right! I tried it and now my only problem is when I type in the date field a future date and tab out of it, it changes the date to todays date. If click out of the table and back into the date field, changing the date again, the new date is accepted.

What is up with this?

Sam

Posted

Does the date field have any auto-enter options on it? Does this only happen when you create a new record or also when modifying an existing one? If you press Enter instead of Tab, what happens?

Posted

The date field does not have any auto-enter ptions on it. It only happens when creating a new record. Once the record is created and it displays todays date, I can go back into the date field and change the date and it accepts it. It does the same thing when I hit the enter or tab key.

Posted

Is the date field local to the current layout's TO or is it a related field?

If there are no auto-enter options or scripts setting the field, it doesn't make sense why it would default to anything. What happens if you create a record and don't enter a date, then commit the record?

Posted

It seems that since the relationship is based on Date, a new related record forces the date to be equal to the parent's date. Once the related record is committed, then the date can be changed as desired. Normally a relationship such as this would be for veiwing purposes only. Additions would be created via a unique serial relationship or at least one that used = not <= or >=, etc.

A related record needs to be created and committed before you attempt to change the date. So you could attach the related Date field to a script to

Go to Layout ["Music LineItem" (Music Schedule Line Item)]

New Record/Request

Set Field [Music Schedule Line Item::Date; Get(CurrentDate)]

Commit Records/Requests [skip; No dialog]

Go to Layout ["Music Schedule" (Music Schedule)]

Go to Field [Music Schedule Line Item::Date]

Go to Portal Row [Last]

Go to Portal Row [Previous]

Set Field [ ; ""]

Note that Set Field has no target field specified, so the currently selected field will be nullified.

You could also make the related Date auto-enter the Creation Date. Then you can remove the Set Field [Music Schedule Line Item::Date; Get(CurrentDate)] portion of the script.

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