What would be the correct input syntax for this?

Hello,

I have 3 tables - Order, DS, DS_Items

I am trying to build an action to create a new record in DS_Items using the values from some columns of Order Table. It works fine till here.

But DS_ITEMS is a child table of DS and hence I also want to add ref of DS when creating this new record.

So I want to include an Input command to set the DS_ID (key column of DS Table) into DS column ( ref of DS table in DS_Items)

I am using the following but it doesnโ€™t seem working



0 16 158
16 REPLIES 16

Tried a few other options too but none works -

INPUT(โ€œDSโ€,"")

This shows no error, but doesnt open the Input Pop up when executing the action. It directly adds the new record with blank value for that column.

Hello @Manish_Jain1, So basically both Order and DS are parent tables of DS_Items, but is also Order related to DS? if so, what is their relationship? one to one? one to many?

If Order and DS are related in a one to one relationship then you could use chained dereferences to pull the key from DS and place it on your DS_Itemsโ€™ new row directly from your action thatโ€™s in your Order table, if itโ€™s one to many then it becomes a matter of using a filter or a lookup to obtain the desired key on your DS table

3X_f_4_f44bf27063b6805d7c03ba535cba14847bd16818.png

Forgive the horrible drawing, I hope that ilustrates my question a bit better

Exactly , Thats the problem. What I am trying to do is Trying to add an Input in this Action to select the DS from the DS Table . So that when I click the action button, I should get the pop up asking me to select the DS and so the action has both the values now required to create the new record in the DS_Items Table - Order(OID) from the orders table and the DS (DS_ID) from the Input function.

I tried this because DS in the DS_Items table is a ref column of the DS Table

INPUT(โ€œDSโ€,"")

Its not showing the error but the Action is not opening the popup at all.

Thank you, your drawing did itโ€™s work, but before we get into the expression part of solving this issue, iโ€™ve got a question:

How do we know which DS key we must add to the new DS_Items row?

Thereโ€™s no direct relationship between Orders and DS, and if we create a new DS_Items row using an action that belongs to the Orders table we only have the information from the Orders row that the action is coming from.

If the action is initiated from the DS table instead, how could we know from which Order row we should extract the column values to place in our new DS_Items row?

I think this problem could be simplified by adding a reference between DS and Orders

I cannot do that because there are multiple orders in one DS and hence the DS_Items Table. See if my explanation above helps you understand my Problem.

I see, you answered my question before I posted it, are you a time traveler? jk

try INPUT(โ€œDSโ€,TEXT("")) , and do remember that when using INPUT() itโ€™s like creating a whole new row, so you have to set all the other columns values as they should be, so make sure the column is not hidden and can be edited by the user in that context.

I wish I were but just a coincidence for now mate โ€ฆ

My columns are like as below -

ID - Autofill as per formula defined in the column definition
Date - Current Date
DS _Item_ID - Autofill as per formula defined in the column definition
DS - FROM INPUT
Order_ID - From the Order Tables from the action

Should I really set all the fields in the pop up form, even if they have a formula defined ?

Well, I havenโ€™t used INPUT() in that context, when there are app formulas in the same table, and there isnโ€™t much information about it in the help docs yet, so my advice is to check if youโ€™re allowed to set values for the columns that already have app formulas, if youโ€™re allowed, just copy the app formula there, if youโ€™re not, then we can ignore it and give it a try.

Tried this but no help yet, It is not opening the Pop window at allโ€ฆ Its automatically adding the record without the pop up.

The Main Problem is its not at all opening the POP UP window to request INPUT . Its executing the action automatically with Order_ID filled from the orders and all other columns using the app formula and leaving the DS field blank.

I see, is the DS column visible, editable, and required?

Maybe we could try a valid_if() that prevents a blank input, and we can see what happens then.

It was visible and editable but not required. I changed it to Required and also valid_if() Expression but no help.

Surprisingly , Its adding the record with the blank rows despite having required and Valid_IF()

3X_6_0_60fca13355ccda7a7585512e40d2b3cf45decb3a.png

Can we consider it to be bug in this Action (Data: add new record in another tableโ€ฆ) where it ignores the INPUT and also the other mandates like required and valid_if.

Hi @Rafael_ANEIC-PY , Is there anything more you can think of on this ? I have tried all the possibilities I can think of.

Yes, I would contact support haha

Thanksโ€ฆ That probably should be marked as solution. Thanks anyway for all the help.

3X_2_5_2577380b491996455461c12aab4f7bf89368049c.png

INPUT() expression is not available for โ€œadd new rowโ€ Action type.

Ok. Thanks For the info @Marc_Dillon

Top Labels in this Space