Initiale value in the same form

Hello guys, 


I have table 1 with a column name and a column value. 

In the seconde table i have a name (ref colum) and an empty space. 

Nog when i start with a form in the seconde table and i give the ref name a value, the value that is connected to the same name in column 1 needs to be given. 

BUT: I also needs te be replaceble? or leaved empty when there is nog value.


I started with an ANY(SELECT(.... but when i put it in the INITIAL VALUE -> It doesn't return a value.. Is this beacuse i'm already in the form and an INITIAL VALUE needs to be predicted before i open the form? 

is INITIAL VALUE not the richt column to fill in? 
When i choose -> FORMULA it isn't editable anymore.. 

Can somebody help me with this? 

Solved Solved
0 4 98
1 ACCEPTED SOLUTION

@Hinse_Wouters 

I was wrong here 


Again as you have already guessed, the initial value is determined when you open a form to add a row and in this case, a value cannot be proposed based on the value of the Nummerplaten which is not determined initially.

You can set an expression in the initial value and extract a value based on the selection of another field. You can choose to accept the proposed value or change it including deleting it.

The expression I used in the below snippet is 

[numberplate].[driver]

where numberplate is a ref col to the ref col in numberplates table where there is a col - driver.

TeeSee1_0-1643970801567.png

 

TeeSee1_1-1643970823716.png

Will this help?

View solution in original post

4 REPLIES 4

Table 2 with a ref col to the key of table 1.

In this case, when you are adding a row to table 2 in a Form associated with Table 2, you have an option to choose a value for the ref col

1) based on the key values of Table 1

2) add a new row in Table 1

3) not to choose any value if the ref col in not set Required.

You cannot use the App Formula because it would automatically populate a value based on the expression you have in the App Formula. So you should use either initial value or suggested value.

So whatever you describe seems to be quite oK.

To help you, you might want to show what the problem is by sharing your table definitions as well as the definition of the ref col for more clarity.

Thank you for your answer. But i think i was not clear... 
1) When i chose: NUMMERPLAAT 

Schermafbeelding 2022-02-03 om 14.38.17.png

Schermafbeelding 2022-02-03 om 14.39.03.png
I want that the name Driver column gets filled with the name that was linked in the NUMMERPLAAT table: 
Example: When i choose (1VKG871 -> I want that the Driver (Alexandru) is filled in the form Above. 

Schermafbeelding 2022-02-03 om 14.40.29.png

So i choose: ANY(SELECT(Nummerplaten[Meters], ( [Nummerplaat] = [Nummerplaat_name] )))


Where [Nummerplaat] is the name of the ref column and [Nummerplaat_name] is the ref column where the value of [Nummerplaat] was taken from. 
So the only real question is: 

When i put this in Initial value -> It doesn't show anything
When i put this in the forumula -> it is not aditable... 
So how can I let this work? 


Importent is that when Alexandru was filled, that there is an option to Change it to an other name. 

I hope this is clear... When you need more info i'm here. Thank you so mutch! 

If you want your drives name filled based on the value you choose in NUMMERPLAAT, then an expression you need in the drive's App Formula is

SELECT(Nummerplaten[Driver], [Nummarplaat] = [_THISROW].[Nummarplaat]).

As you are already aware, having an expression in the App Formula makes the col user UNeditable.

If you want the col to propose a value based on the logic above and also be editable, I do not know how to do it.

Again as you have already guessed, the initial value is determined when you open a form to add a row and in this case, a value cannot be proposed based on the value of the Nummerplaten which is not determined initially.

I maybe wrong. I will also seek advice from other community members with more experience.

@Hinse_Wouters 

I was wrong here 


Again as you have already guessed, the initial value is determined when you open a form to add a row and in this case, a value cannot be proposed based on the value of the Nummerplaten which is not determined initially.

You can set an expression in the initial value and extract a value based on the selection of another field. You can choose to accept the proposed value or change it including deleting it.

The expression I used in the below snippet is 

[numberplate].[driver]

where numberplate is a ref col to the ref col in numberplates table where there is a col - driver.

TeeSee1_0-1643970801567.png

 

TeeSee1_1-1643970823716.png

Will this help?

Top Labels in this Space