Removal of add item column after order status changes

Hi i created a copy of the order capture app, and have also enabled Completed orders in the view.

I want to remove the add item below the virtual order details column after the status is changed to complete , so that no one can manipulate completed order.

Please help me in this regard

Solved Solved
1 21 1,956
1 ACCEPTED SOLUTION

@DPM_reports,

Yes, in general I believe you should be able to do that.

View solution in original post

21 REPLIES 21

Here is a workaround you may want to consider based on how your app is configured.

You could create a slice on the child table that is with permissions read only. You could then create a REV_REF column in the parent table with this slice as ref table.

You will now have two list type reverse reference virtual columns in the parent table- One that is based on child table with add, update ( and may be delete permissions if your app needs it) permissions . The other list type reverse reference column will be based on the slice with only read only permissions.

You can show these two list types columns with different show if constraints, the one based on child table can have show_if expression of [Order Status]<>โ€œCompleteโ€, the one based on slice can have show_if expression of [Order Status] = โ€œCompleteโ€
One little drawback is when you make the status complete in the form itself , the related child records do not show in the form view till the form is saved. I believe this will happen when child table records are marked " as part of" master table.
Edit: added description that the slice is on the child table.

Hello @Suvrutt_Gurjar, sorry for necroing this thread, but i have given one of the solutions you described a go and havenโ€™t managed to make it work, so Iโ€™m once again asking for your support.

I have done that, but the instant i set the [Status] of a row to โ€œClosedโ€ (cerrado in spanish) i canโ€™t see any of the new rev_ref columns, so iโ€™m guessing thereโ€™s something wrong with my column or slice configuration, adding a screenshot of each for reference:

Slice screenshot

Rev_ref column screenshot

Hi @Rafael_ANEIC-PY

Hope you are not experiencing the below quoted behavior. Also typically the Rev_Ref columns need to have opposite Show_if constraints? In the screenshot shared by you, it sounds you have permanent show_if on the rev_rf column.

Iโ€™m using actions to change the status column from the detail view of the parent table, so i donโ€™t think thatโ€™s the case.

Yes, i set them both to be visible to make troubleshooting easier, i have set them on opposing show_ifs now, like [Status]=โ€œOpenโ€ and [Status]<>โ€œOpenโ€, but the issue still persists, i have checked the spreadsheet and the references are good too, so maybe thereโ€™s something funky going on with my reverse-referenced slice criteria?

Thank you for the quick response and your support !

EDIT: added 9 seconds gif for showing the issue:

GIF

@Rafael_ANEIC-PY ,

Thank you. Could you please confirm if you have created an additional ref view (table or deck type summary view) on the read-only slice that you must have created for the order status โ€œClosedโ€

As a side note, I believe may be it is a better approach to have the slice status to be checked as [Status]=โ€œClosedโ€ rather than [Status] <>โ€œOpenโ€

Yes, i have, itโ€™s really weird since i have another table with a similar configuration (a slice of a table present in a rev_ref column) but this one is not working, i must be overlooking something very simple haha.

Oh god, i just realized i may have not added the virtual columns to the detail view in the UX, be right back.

EDIT: Yep, i forgot to add those new columns to the parent table detail view, thank you @Suvrutt_Gurjar , and sorry

Hey @Rafael_ANEIC-PY ,

Good to know it works per requirement. You are welcome. No problem. We all have made those occasional minor errors.

By the way, your community contributions are impressive. All the best.

Thank you @Suvrutt_Gurjar, Iโ€™m moved by your kind words 3X_4_a_4a1239de1f866c4032ac19b1196ff1691e5955e8.gif I consider you one of the great masters of this awesome community.

Build a how-to app based on the Suvrutt_Gurjarโ€™s comment
https://www.appsheet.com/samples/preview?appGuidString=83be58ea-1901-4a6d-ac9c-38c7c555d8cd.
It works well and there are two more things I want to mention:

  1. We need to give these two rev-ref columns different name.
  2. The appsheet will create a new column RELATED ORDER DETAILS automatically, just click the SHOW? button to make sure it wonโ€™t show up.


is there a way we can make this such a way that only certain users can get the add button to edit the infoโ€ฆ

@DPM_reports,

Please explore if following helps.

With reference to the sample app shared by @ZhipengY, please try in the show_if constraint of the reverse reference list type column โ€œOpen Order Detailsโ€, an expression like following

OR([Order Status] = โ€œOPENโ€, AND([Order Status] = โ€œCompleteโ€, IN(USEREMAIL(), LIST(โ€œallow1@email.comโ€,"allow2@email.com" ))))

Here โ€œallow1@email.comโ€,"allow2@email.com" are emails where you wish to allow add access to the child table, even after the order status is โ€œcompleteโ€

Please try in the show_if constraint of the reverse reference list type column โ€œComplete Order Detailsโ€, an expression like following

AND([Order Status] = โ€œCompleteโ€, IN(USEREMAIL(), LIST(โ€œdisallow1@email.comโ€,"disallow2@email.com", disallow3@email.com" ))))

โ€œdisallow2@email.comโ€, disallow3@email.com" are emails to whom you do not wish to allow add access to the child table, once the order status is complete.

Edit: Please test it well that it satisfies your requirements.

hi i have a table where i have users who i have set as admin via a Yes or No โ€ฆ
cant i use this table in the expression to say whoever is not admin will not have edit access to add itemsโ€ฆand those who have can have edit access

@DPM_reports,

Yes, in general I believe you should be able to do that.

in that case can u help with the expressionโ€ฆ

I believe,your expressions will need to include lists of user emails built with SELECT () expressions around your USER table

In case of above, an expression something like below may be tried

OR([Order Status] = โ€œOPENโ€, AND([Order Status] = โ€œCompleteโ€, IN(USEREMAIL(),
SELECT(Your User TableName[USER Emails Column Name], [Your Admin Role Column]=TRUE)
)))

In case of above , please try an expression something like,

AND([Order Status] = โ€œCompleteโ€, IN(USEREMAIL(), SELECT(Your User TableName[USER Emails Column Name], [Your Admin Role Column]=FALSE))))

Please test these well as per your requirement.

Hello,

I am trying to create my Despatch Slip Module. This Module Comprise these Tables

DC
DC_Items
Items_Packed

Each DC will have a number of Items , that will come from Items Table and Each Item will have the list of the Items as they are packed. It can be easily built using the Inline views but what I want is

  1. a hierarchial list kind of view something like Image attached in the post I am replying to ( though I am not too sure if its list kind of stuff or the same inline views) . What I want is a List - with ITEM and Total Qty and Items_Packed in the following rows rather than getting nested into Inline views. I want to view the Entire Slip with all the Items and their packing details in the same page .

  2. I also want to create a PDF of the same (using a template) and be able to print that slip. How is that possible ?

Hi @Steve

Can you help me with this ?

The help youโ€™re requesting here is beyond what Iโ€™m prepared to offer, Iโ€™m afraid.

AppSheet has no built-in support for hierarchical views. You might find some ideas searching the community, as many have tackled this problem.

A single table (or table view) cannot contain (or display) rows from several other tables.

The best you can get is a detail view with inline tables, or a dashboard view.

Thatโ€™s entirely possible. The kind of presentation you want is actually easier to produce in a report than on the app screen.

AppSheet has no built-in support for printing. Again, a problem many here in the community have dealt with, so doing a search might provide some help.

But is it possible to create a report on the click of a button than specific schedule and also if it is possible to have the data from different tables like I mentioned above in the same report .

I am planning to have a print button that when clicked will create the pdf report based on a template . Possible ?

Sort of. Reports are generated by the servers, so the button click has to make a data change, which must then be synced to the server, which the server must detect (typically with a workflow), then generate the report.

A report can include data from any table configured in the app.

Yes, except AppSheet itself cannot print.

Thanks . Let me try.

Top Labels in this Space