How can I make an inline not editable? For ex...

(Alfredo Pou) #1

How can I make an inline not editable? For example: Once an order with several items was delivered, it should not be possible to modify the products, not the quantities. Is there a way to configure an “edit if” for an “inline” frame?

(Mary Jane Pender) #2

Hi Alfredo,

I think if you put an Edit If on the columns Products and Quantities something like this:

Edit_if = [Status]<> “Delivered”.

Assuming you have an order status column and “Delivered” is one of them.

This will allow you to edit these fields as long as the status is anything but Delivered. Hope this helps.

mj

(Alfredo Pou) #3

Trying to implement this I realized an error. And that is actually that “in line” must correspond to a Slice and not the original table because there are fields that are filled at the time of loading the order and other fields that are filled at the time of delivering the product, and should not be in sight. Besides that the slice allows me to change the order of the fields according to the importance in each form. Then I create a new detail view of the slice where the items to be delivered are loaded, but I do not know how to assign it to the order loading form where this “in line” is inserted. In the views once created it does not allow to reassign the table, and in fact this “in line” view was created by the system. References between views are created automatically. How would I have to do so that when loading an order, and then select New in the In line, open the form of the slice instead of the original table?

(Aleksi Alkio) #4

You can create an additional virtual list for your Order table. When you have two virtual lists, you are able to play with the Show_If option… when it’s a new order, show the original inline table, when you are modifying that order, show the slice inline table.

(Alfredo Pou) #5

That’s what I was trying to do, but I do not know how. I’m looking in the help and in google to create virtual list, but I can not find anything, all the results speak of virtual colmns. Could you give me a link to some document about this topic?

(Aleksi Alkio) #6

You can read the existing status with a formula IN([KeyColumn],TableName[KeyColumn]). If this is FALSE, it means that it’s a new record.

(Alfredo Pou) #7

What I did not understand was this: “You can create an additional virtual list for your Order table. When you have two virtual lists, you are able to play with the Show_If option… when it’s a new order, show the original inline table, when you are modifying that order, show the slice inline table.”

How do I create a virtual list? I did not find documentation about virtual list.

(Aleksi Alkio) #8

It’s the same virtual field you already have when you made a ref field. You can call it as inline field as well. If you open that field, you will see a REF_ROWS expression (app formula). Copy that formula and add a new virtual column and paste that formula with the slice name, and now you should have that virtual list column.

(Mary Jane Pender) #9

Alfred, that warning tells me you already have an app formula for that column.

Can you tell me what the existing formula is in that column?

(Alfredo Pou) #10

Is the REF_ROWS fórmula that automatically generate the app to show the inline

(Mary Jane Pender) #11

Sorry, I didn’t realize that one of your columns (looks like product) was a Ref column to the product table.

You can’t put any column constraints in a Ref column.

I wonder if there is a way to make the view read only when the status = Delivered.

Let me take a look at that option.

(Alfredo Pou) #12

There has to be a way to convert the inline into read only … but I can not find it

(Mary Jane Pender) #13

Let’s see if Aleksi has some idea.

(Mary Jane Pender) #14

ALEKSI – could you help Alfred with this one?

(Levent KULAÇOĞLU) #15

Creating a slice with read-only mode and switching the REF_ROWS expression’s table to this slice will possibly solve it

(Aleksi Alkio) #16

@Levent_KULACOGLU I believe that won’t work because then you would not be able to fill the original record in the beginning.

@Alfredo_Pou You could add a formula NOT([STATUS]=“Delivered”) for EDITABLE_IF on the products table. If you have lot of fields on that table, you could create a virtual column (Y/N) with the [STATUS]=“Delivered” and then use that answer where ever column you want as Valid_If. If that validation is not TRUE, you can’t save the product.

(Alfredo Pou) #17

I did that but it returns the following warning: "Column name ‘Articulos’ cannot use an edit if constraint if it has an app formula.

The edit if constraint will be ignored"

(Mary Jane Pender) #18

Hi Alfredo,

I think if you put an Edit If on the columns Products and Quantities something like this:

Edit_if = [Status]<> “Delivered”.

Assuming you have an order status column and “Delivered” is one of them.

This will allow you to edit these fields as long as the status is anything but Delivered. Hope this helps.

mj

(Mary Jane Pender) #19

Alfred, that warning tells me you already have an app formula for that column.

Can you tell me what the existing formula is in that column?

(Alfredo Pou) #20

Is the REF_ROWS fórmula that automatically generate the app to show the inline