How do I associate an uploaded image with a record?

0
I have an entity called Student with name, ID etc., and I have an image entity called StudentImage. I'm able to edit the Student detail and upload an image, but it doesn't seem to be associated with the Student record. I know the image is uploading, because I created an image page to show all my images.   In order to activate the upload image widget from the student, I created a microflow that created the StudentImage object, then "changed" the Student (StudentImage_Student) by setting the $NewstudentImage.   Is there something else I need to do to associate the new image with the student?   Any advice is appreciated! Thank you.
asked
5 answers
1

  Here's the domain model

answered
1

  Here's the microflow to create the new image object

answered
1

  Here's the page with the upload image widget.

answered
0

Mark,

As long as you commit the Student object, the association value you set should be in the database.

What kind of association did you create between Student and StudentImage  (1:1, 1:M, M:M)?  How are you trying to view the image associated with a Student, that is not working? 

Mike

answered
0

Student to StudentImage is 1:1. The image is uploading. I have a page that just lists all images, and I can see my images that I uploaded.  But when I try to list the image with a name (which is stored in Student), it's blank.

 

The other way is on the EditStudent page (one student per page), I have the StudentImage (over associate StudentImage_Student), and the image is blank. This is where I put the image uploader, so in theory, once I upload an image associated with a student, that student image should show . . . I think.

 

Any ideas?

answered