Anyone know how to solve this?
Situation:
I have two BO's one call Questions and one called Answers.
I have a query that lists a set of questions in a BO Questions.
BO Questions has a Relationship to BO Answers with Multiple Allowed turned on because there can be multiple answers to a single question (e.g. different students answering same question).
I have a query that lists the questions and with an Operations button that Starts a Process called Provide_Answer.
The Provide_Answer process is:
IF Questions.AnswersLink.AnswerText IS DEFINED Then
EDIT Questions.AnswersLink USING 'Main'
DISPLAY MESSAGE 'Answer has been saved.'
ELSE
ENTER NEW Answers USING 'Main'
Problem:
When an Answer already exists, the Edit portion of the process rules works perfectly. However, when no answer exists yet, it opens up the New form fine but it does not know which Question instance to attach the Answer instance too.
Note:
When I use the standard Operations button Edit, it automatically handles whether or not it is a 'edit' or 'create' is needed. However the issue is that when using the default Edit Operations button, it opens up the New Question form first and then from there the user need to click 'Add New' button. I am trying to circumvent that extra step and just let the user click 'Answer the Question' and it directly open up either the edit form or create new form.
Any help would be greatly appreciated!