Hi all,
I have a dropdown with the following items:
Items=SPInstructors.InstructorName
These Items are in form of text in the SPInstructors list
The choice of this dropdown now needs patched into another SP list named SPfeedback. The column it will be patched into is text as well. I have the following patch code:
Collect(
col_Submit,
{
Title: "Comments",
Answer: CommentsInput.Text,
Instructor: box_Instructor.Selected,
Session_detail: box_SessionDetail.Selected
}
);
ForAll(
col_Submit,
Patch(
SPfeedback,
{
Title: Title,
Answer: Text(Answer),
Stage: Text(First(Stage).Value),
Session_Type: First(Session_Type).Value,
Comment_Grade: Text(Comments_Grade),
Session_detail: (Session_detail).Value,
Instructor: (Instructor).Value
}
));
The patch works fine without the last line ("Instructor: (Instructor).Value"). If I add the last line I get the error saying that it is not a record that I am putting in... any ideas where I went wrong? I think its because the dropdown is effectively a lookup from a SP list and thus the formatting might be erroneous..
Many thanks,
Tom
Solved! Go to Solution.
I am sorry to ask this question again, but the Items property - is it
SPInstructors.InstructorName
It is the above.
I know, that's why I am puzzled by the error I am getting...
OK @tupues ,
Some trouble shooting - put a value in the box and put this on a button
ClearCollect(colTest,box_Instructor.Selected)
The go to View > Collections and see what is in colTest
I get the name selected.
(your help is awesome by the way 🙂 )
Yes, but what is the column name?
The name is "InstructorName" (without the quotes)
OK @tupues ,
This is getting weird.
Two things, put a label on the screen with the Text property
box_Instructor.Selected.InstructorName
and see if it gives a value when you put input into the box.
Secondly out of desperation rather than anything else, try
Collect(
col_Submit,
{
Title: "Comments",
Answer: CommentsInput.Text,
Instructor: box_Instructor.Selected,
Session_detail: box_SessionDetail.Selected
}
);
ForAll(
col_Submit,
Patch(
SPfeedback,
{
Title: Title,
Answer: Text(Answer),
Stage: Text(First(Stage).Value),
Session_Type: First(Session_Type).Value,
Comment_Grade: Text(Comments_Grade),
Session_detail: (Session_detail).Value,
Instructor: col_Submit.Instructor.InstructorName
}
)
);
@WarrenBelz wrote:OK @tupues ,
This is getting weird.
Two things, put a label on the screen with the Text property
box_Instructor.Selected.InstructorName
This gives me the Name as selected in the dropdown...
Secondly out of desperation rather than anything else, try
Collect(
col_Submit,
{
Title: "Comments",
Answer: CommentsInput.Text,
Instructor: box_Instructor.Selected,
Session_detail: box_SessionDetail.Selected
}
);
ForAll(
col_Submit,
Patch(
SPfeedback,
{
Title: Title,
Answer: Text(Answer),
Stage: Text(First(Stage).Value),
Session_Type: First(Session_Type).Value,
Comment_Grade: Text(Comments_Grade),
Session_detail: (Session_detail).Value,
Instructor: col_Submit.Instructor.InstructorName
}
)
);
Results in the error below...
OK @tupues ,
I probably should have re-confirmed this before - what is the field type Instructor in your data source?
That's a single line of text.
Ok - looking at colSubmit - run this by itself and send me a screenshot of the Instructor field (in View > Collections)
User | Count |
---|---|
232 | |
109 | |
94 | |
58 | |
29 |
User | Count |
---|---|
292 | |
126 | |
106 | |
62 | |
57 |