How can I insert an "ADD" button beside Photo attribute?

Hi all,

I want to add an “ADD” button beside the “Photo” entity (screenshot-1) which will be able to take 1 to 7 (multiple) pictures and the pictures will view in the one after another like a Grid view.

How can I do this? Kindly help. (Details in the screenshot)

Thanks

Solved Solved
0 28 1,564
1 ACCEPTED SOLUTION

Regarding the community members, here is the solution:


STEP-1 :: READ-ONLY SLICE


Summary

A slice is created with READ_ONLY attribute from the Photos Table. Nothing special, no conditional rules, all columns selected. The slice is named as slice_Photos.


STEP-2 :: PRODUCT REVERSE-REF COLUMN


Summary

[Product] ref column in Photos table is set as isPartOf to show this column as a reverse reference in Product_Form


STEP-3 :: VIRTUAL REF COLUMN


Summary

In Product table a ref type Virtual Column is created with below expression. This column is named as Limited Photos.

REF_ROWS("slice_Photos", "Product")


STEP-4 :: SHOW_IF CONDITION


Summary

[Related Photos]

COUNT([Related Photos])<7

[Limited Photos]

COUNT([Related Photos])=7

STEP-5 :: INLINE VIEW


Summary

System generated Photos_Inline UX view has been copied, renamed as slice_Photos_Inline and Data set to slice_Photos


STEP-6 :: PHOTOS FORM


Summary

Photos_Form is set to Auto Save and Auto Re-Open


STEP-7 :: PHOTO VALIDATION*


Summary

A Valid_If condition is set for Photos Table, [Photo] column along with a custom error message to prevent addition of more than 7 photos.:

Valid_If

COUNT([Product].[Related Photos])<7

Invalid Value Error

"Max. 7 photos can be added!"


FINAL RESULT


Summary

Add button is disabled/removed when there’s 7 child records for the parent table

View solution in original post

28 REPLIES 28
Top Labels in this Space