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! Go to Solution.
Regarding the community members, here is the solution:
STEP-1 :: READ-ONLY SLICE
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
[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
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
[Related Photos]
COUNT([Related Photos])<7
[Limited Photos]
COUNT([Related Photos])=7
STEP-5 :: INLINE VIEW
System generated Photos_Inline UX view has been copied, renamed as slice_Photos_Inline and Data set to slice_Photos
STEP-6 :: PHOTOS FORM
Photos_Form is set to Auto Save and Auto Re-Open
STEP-7 :: PHOTO VALIDATION*
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
Add button is disabled/removed when thereโs 7 child records for the parent table
You need to create a reverse reference with the Photos table (if you donโt have such a table, you need to create) and when youโre filling the form in your screenshot, a NEW button will appear (you can change the name to ADD or whatever you like via locale settings) and then limit the number of reference records for the parent table to 7.
Hi,
I have added
COUNT(Product[Related Photos]) <= 7
query under Add (sys-gen of Product table) -> Beheviour -> Only if this condition is true
This isnโt worked.
Then I have this one,
COUNT(
SELECT(
Product[Related Photos],
[Item code] = [_THISROW].[Item code]
)
) <= 7
also not worked Sir.
Is it possible to hide add button after 7 photos added
@abirtanjinadnan
You can use below expression in your child tableโs Are updates allowed property. Letโs assume that you want to limit the records by 50:
IF(
COUNT(SELECT(Photos[KeyColumn],TRUE))<=7,"ADDS_AND_UPDATES","UPDATES_ONLY"
)
You may change the allowable status as per your needs. Above is just an example. Provided you donโt want the related photos to be even edited and adds only, you can re-phrase the expression:
IF(
COUNT(SELECT(Photos[KeyColumn],TRUE))<=7,"ADDS_ONLY","READ_ONLY"
)
You can remove any expression under system-gen Add as well and return it to TRUE
Hi,
Sorry! Itโs not working. I have added this condition in child table โPhotosโ. (1st picture)
The add button has gone. But if there are less than 7 photos, itโs also not showing add button. (2nd picture)
Remove any editable_if or show_if conditional expression in your Related Column, system generated add button or similar
Sorry.
Still not working.
Actually, I need to hide add button when the related photos limit goes to 7 (picture-1)
@abirtanjinadnan
Share your app with levent@able3ventures.com as a co-author and I will handle it.
Yes. I have shared.
Noticed that @abirtanjinadnan. Please do not interact with the app or the editor now.
@abirtanjinadnan
Can you also please give me EDIT ACCESS for your sheet? Thnx.
Maybe, this is edit access option.
Yes. shared
@abirtanjinadnan
Please share the gSheet with Edit access as well.
Yes. gsheet shared
Another thing is that when I select a photo for the Product tableโs Photo attribute, the search page is showing all the items. I want only the items of that specific product.
@abirtanjinadnan
Mission accomplishedโฆ
You can now remove my edit access from the gSheet and the app.
How?
โNEWโ is not one of the texts in localize, and neither an action I can find (to display a different nameโฆ)
Any tip here?
Hello @abirtanjinadnan
As @LeventK is suggesting. You need to have two tables. One table for the parent entity and another table for the photos child table.
Can you share a screenshot of your tables?
Hi @LeventK and @Eloy_Paredes_Henriqu
Thanks for your suggestionsโฆ Actually, my idea was, there is a Product table, where one can add several photos under one product (it can be upside, downside, left of product/ retail box). And photos will be added as related photos, which I have solved from @LeventK 's suggestion. by adding Photos Table.
But I need to select one photo from related photos (virtual column) list which will be added inside Product table as Photo attribute. (which is also solved).
But, when I am adding a Photo in my photo attribute of the Product table, the list is suggesting all photos from Photos table. I want to see only Photos of same labelled (same item code) (screenshot-1)
I am adding my Column/ App screenshots here.
Thanks
@abirtanjinadnan
For your [Photo] column of your Producst table, you can use a Valid_if:
SELECT(
Photos[_ComputedKey],
[Product] = [_THISROW].[Item Code]
)
Use this tehnique
Regarding the community members, here is the solution:
STEP-1 :: READ-ONLY SLICE
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
[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
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
[Related Photos]
COUNT([Related Photos])<7
[Limited Photos]
COUNT([Related Photos])=7
STEP-5 :: INLINE VIEW
System generated Photos_Inline UX view has been copied, renamed as slice_Photos_Inline and Data set to slice_Photos
STEP-6 :: PHOTOS FORM
Photos_Form is set to Auto Save and Auto Re-Open
STEP-7 :: PHOTO VALIDATION*
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
Add button is disabled/removed when thereโs 7 child records for the parent table
Thank you so much @LeventK
Can I keep the edit and delete permission for photos after 7 pictures added?
Yes, definetely you can @abirtanjinadnan
Hi,
Is it possible to hide save/ cancel buttons from this form?
Nope and why you want to remove them?
Good information thanks for sharing
vmware
User | Count |
---|---|
15 | |
11 | |
11 | |
8 | |
3 |