balooka Posted March 10, 2003 Posted March 10, 2003 Hi, I'm working on a solution for a medical office. I have a calendar system in it and a line-item DB holds the userfiles (doctors, nurses etc). The main DB holds all appointments, and a selfrelated portal is setup. A calc field calculates the date selected + the ID of the user (01-01-2003 G1, where G1 is the ID). When clicked on a date it will set the selected date in the calcfield but until a user is selected (providing the ID) the portal will stay empty. However, I would like to see the portal showing all appointments for that dat for all users. Only after selecting a user it should filter. Is there a way to enter a wildcard or something that the relationship understands? I've tried the '?' and '*', but those don't hold up. I could create a 'masteruser' and set it's ID to the standard ID everytime a date is clicked but that would mean it would show up in the portal aswell... TIA JP
BobWeaver Posted March 10, 2003 Posted March 10, 2003 You need to use two separate calculated fields for your self-join relationship. Use this for the left side key field: DateToText(DateSelected)&UserID and this calculation for the right side key field: DateToText(DateSelected)&UserID&"
balooka Posted March 10, 2003 Author Posted March 10, 2003 Hi, I've tried the above calcs and I think they would work but I can't index the calculation, making them useless for the self-join. The 'DateSelected' is a global that contains a date set by the calendar, the 'UserID' is a global with the userID set by a script (from the line item DB). Both calculations did what they should do (thanks for pointing that out) but I could not make then work for a selfjoin Any thoughts JP
Ugo DI LUCA Posted March 10, 2003 Posted March 10, 2003 Is there anyway you could use date and text field for that purpose. You could cal a update script when the entry is processed to clear the values entered. If you need these globals in your script, keep them and call a subscript to set d_date andt_ID using these globals.
Kurt Knippel Posted March 10, 2003 Posted March 10, 2003 The correct calculations should be: Use this for the left side key field: DateToText(DateSelected)&UserID and this calculation for the right side key field: DateToText(Date)&UserID&"
Ugo DI LUCA Posted March 10, 2003 Posted March 10, 2003 Correct Hmm...Left....Right. Where's my left ? Oh yeah. Sorry for the stupid answer Balooka...
balooka Posted March 10, 2003 Author Posted March 10, 2003 hehe thank you both! Ugo, thats ok - I was wondering why you gave me that solution to my problem. Haha, I actually tried to get that working but its a mess when you update ALL the regular fields in ALL the recourds that are found. This would require a find and a loop for setting the correct fields etc... Thanks anyway
Recommended Posts
This topic is 7930 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 accountSign in
Already have an account? Sign in here.
Sign In Now