How can I clear attribute data for a conditional dropdown attribute when the dependent attribute value changes?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have an attribute called Shoot Date and an attribute called Scheduled Set Name.

For each Shoot Date there are multiple related Scheduled Set Names (Set A, Set B, Set C, ect that are tied to that date). 

I have set up the attribute Scheduled Set Names to be a conditional based on the value of Shoot Date so if a user selects a Shoot Date of 9/10/2016 they only see the Scheduled Shoot Date values tied to that date. 

The issue we have is that we sometimes change Shoot Date, but the value for the Scheduled Set Names remains the same value tied to the old Shoot Date and is then pulling inaccurate information for the updated Shoot Date.

Is there a way to clear the data in Scheduled Set Names when the value for Shoot Date Changes?

Photo of Nicholas

Nicholas

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,438 Points 50k badge 2x thumb
I think that you may need to settle for a warning message on the Shoot date record to warn if it is tied to Set names for a different date.

It probably can be natively automated to clear those dates (or delete those record, if that is what you really want, by using the new webhooks feature of QuickBase.  Contact me via the information in my profile if you want to pursue that, as the steps to set that up using webhooks are too complex to explain on this forum.
Photo of Xavier Fan

Xavier Fan, Champion

  • 340 Points 250 badge 2x thumb
Can you give a few details about your table structure and the setup of your conditional dropdown?

Is it something like:

Tables:
- 1 table called Shows (what is the key field?  Record ID# or something else?)
- 1 table called Shoot Dates  (what is the key field?  Record ID# or something else?)
- 1 table called Scheduled Set Name  (what is the key field?  Record ID# or something else?)

Relationships
- 1 Show has many Shoot Dates
- 1 Shoot Date has many Scheduled Set Names

If I understand you correctly - let's use an example:

Show A has a number of Shoot Dates - say 9/10/2016 and 9/11/2016

Shoot Date 9/10/2016 has 3 Scheduled Set Names:  Set A, Set B, Set C.  These are "children" of Shoot Date 9/10/2016, and are related directly to that record.

Now you've changed Shoot Date 9/10/2016 to 9/17/2016.  Set A, Set B, Set C are still tied to Shoot Date 9/17/2016.

Or am I misunderstanding, and Set A, Set B, Set C are not related directly to the Shoot Date record?

Please explain how the conditional dropdown is set up:

Is it something like:
i.e. Conditional values:  A selection in [Related Shoot Date]
Show choices where [Related Shoot Date] = [Shoot Date:  Record ID#]
Photo of Nicholas

Nicholas

  • 0 Points
Table Structure is as follows

Table 1 -> Table 2

Table 1: Studio Set Schedule (Master)
attribute: Shoot Date
attribute: Scheduled Set Name
attribute: Assigned Photographer
attribute: Assigned Stylist

Table 2: Order Request (child)
attribute: Shoot Date
attribute (ref): Related Scheduled Set Name
attribute (lookup): Assigned Photographer
attribute (lookup): Assigned Stylist

example records:
Table 1:
Record ID - Shoot Date - Scheduled Set Name - Assigned Photographer - Assigned Stylist
Schedule 1 - 9/17 - Set A - Photographer Bob - Stylist Mary
Schedule 2 - 9/17 - Set B - Photographer Rick - Stylist Joan
Schedule 3 - 9/18 - Set A - Photographer Mike - Stylist Steve
Schedule 4 - 9/18 - Set B - Photographer Tim - Stylist Emily

Table 2:
Record ID - Shoot Date - Related Scheduled Set Name - Related Photographer - Related Stylist
Order Request 1 - 9/17 - Set A - Photographer Bob - Stylist Mary
Order Request 2 - 9/17 - Set A - Photographer Bob - Stylist Mary
Order Request 3 - 9/17 - Set B - Photographer Rick - Stylist Joan
Order Request 4 - 9/18 - Set A - Photographer Mike - Stylist Steve


How the conditional dropdown is set up:
Select a Shoot Date on the Order Request
Find Scheduled Set Name records where OR: Shoot Date = SSS: Shoot Date
Select a Scheduled Set Name record from conditional dropdown to pull in lookup fields.

Issue:
When we change Shoot Date on the Order Request the old value for Scheduled Set Name remains, pulling in the incorrect assigned photographer and stylist for that shoot date.

Looking for a way to either notify the User when they change the Shoot Date and the Scheduled set name does not match or clear the Schedule Set Name when the Shoot Date is updated so they know to select a new Scheduled Set Name.
NOTE: They are sometimes changing Shoot Date in Grid Edit for multiple records.

Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,438 Points 50k badge 2x thumb
Hi
I have been ruminating about this for a few days now.

 I think the issue basically comes down to this. The parent record has a date field. The child records also have date field. They are supposed to match.

I suggest that you make a summary field on the parent of the number of trying to records where the date of the parent which came down by look up field does not match the date field on the child.

 Then what you can do is set up a instant email notification when the parent is saved and the number of miss matched children is greater than zero. That will be a reminder to the user that they need to reselect the children. Then you can reinforce that with a daily subscription  or records with Miss matched children so that somebody get them sorted out the next day.
Photo of Xavier Fan

Xavier Fan, Champion

  • 340 Points 250 badge 2x thumb
You can use email notifications to send you a list of the Order Requests edited - where the Shoot Dates don't match the date from Studio Set Schedule.  This works for both single record updates, and multi-record updates (e.g. Grid Edit)

First of all - your Email Notification needs to be of Permission Type = "Open".

Then set up your email notification as follows (you can adjust the parameters as needed for how your app is set up).  

(I had a created a text field called [Order Request Name] - so that I could name them different things and track them during tests).

Notify when:  an Order Request is modified AND when specific fields change:  Shoot Date

AND when the following conditions are true after the change

Shoot Date is not equal to the date in the field Studio Set Schedule - Shoot Date

Message Type:  Custom Message


Single Record Version:

The following Order Request need to be updated:

Order Request Name: [Order Request Name]


Record ID: [Record ID#]

Shoot Date: [Shoot Date]

Schedule Shoot Date:  [Studio Set Schedule - Shoot Date]

%recLink%


Multiple Record Version:

The following Order Requests need to be updated:

%RepeatOn%

Order Request Name: [Order Request Name]

Record ID: [Record ID#]

Shoot Date: [Shoot Date]

Schedule Shoot Date:  [Studio Set Schedule - Shoot Date]

%recLink%

%RepeatOff%



When grid editing - this produces an email that looks something like this:

Order Request Name: Order Request 1
Record ID: 1
Shoot Date: 09-21-2016
Schedule Shoot Date:  09-17-2016
[link to Order Request 1]

Order Request Name: Order Request 2
Record ID: 2
Shoot Date: 09-21-2016
Schedule Shoot Date:  09-17-2016
[link to Order Request 2]

Order Request Name: Order Request 3
Record ID: 3
Shoot Date: 09-21-2016
Schedule Shoot Date:  09-18-2016
[link to Order Request 3]

Order Request Name: Order Request 4
Record ID: 4
Shoot Date: 09-21-2016
Schedule Shoot Date:  09-17-2016
[link to Order Request 4]



I also tested using Webhooks for this - and was able to blank out the Related Studio Set Schedule when editing the Shoot Dates for single Order Request records, but not when editing multiple records using Grid Edit.

So maybe this email notification will help, or using Mark's suggestion, etc.



Online help for Creating Custom Emails:

http://help.quickbase.com/user-assistance/#creating_custom_email_tips.html%3FTocPath%3DUsing%2520a%2...