When I select InventoryId and click on the button, all requests for this ID are displayed
inventory id first
When I choose another Id, requests for a different Id should appear, but again requests for the first one appear.
inventory id second
inventory id query
If I delete the first request, the second one is displayed fine, but if I add another InventoryId again, it doesn't work, it always works only with the first one.
aspx
SincPosition = True
What else can you do?
The problem ended up in aspx.
In
<px:PXTabItem Text = "Document Details"></px:PXTabItem>
all <px: PXGrid> had "SyncPosition = "True""
As soon as I changed it to SyncPosition = "false" everything worked successfully
Related
I have a button for the user to submit a SharePoint list item for review. On the click even a variable is set which updates the text status field in the SharePoint list. Here's how the status field is updated, it checks if the value is blank and sets it to draft status, if that fails then it checks the variable status update field for blanks, if nothing in the variable then it uses what is stored, otherwise it takes the value from the variable:
If(IsBlank(Parent.Default),"Draft",If(IsBlank(varStatusUpdate), Parent.Default,Text(varStatusUpdate)))
For the date field, I'm also checking for nothing on the SharePoint list, then I'm checking the same status update variable. When blank, use what is stored in the list. If the value is "pending approval" then it should get current date.
If(IsBlank(Parent.Default),Blank(),If(IsBlank(varStatusUpdate), Parent.Default, If(varStatusUpdate="Pending Approval", Now(),Parent.Default)))
When testing the updated Now() value appears on the screen but it isn't saved to the list. When published to SharePoint the value is never saved or updated.
Any ideas?
One way of updating the logic and the value from a Datacard in your form to a datasource is to change the Update property for a specific Datacard
Example -
Originally:
Changing the Update values:
or
Where DataCardValue2_6.Text is the text input for the column.
Only way I could get this to work was to use the patch command like below:
Patch('LTRequest', ThisItem,{
SubmitDate: Now(),Status:Text("Pending Approval")});
Back();
I have a created list with values in it
When I create an item and click on "Next" then it should save and redirect to "Edit form". But instead of showing the values I have entered, it shows the previously edited item.
What am I doing wrong?
Please check the default value of the form.And also one thing you can do is ,you can always filter the First row from the list,so it always shows the latest saved data.
I need to create the button to replicate when user click "+" button on the top of the screen then populate value of the field.
Base.Insert.Press();
However, I have an issue that code above does not clear the form like when user click "+" button. I need to be able to clear the form after insert like when click Acumatica's "+" button. I have try following code in attempt to clear the form but no luck.
Base.Caches.Clear();
Base.Document.Cache.Clear();
Base.Document.Cache.ClearQueryCache();
Base.Document.View.RequestedRefresh();
The below code works in Sales order extension. What I did is; I cleared the whole graph and then inserted a new header record to the header cache.
this.Base.Clear();
SOOrder head = new SOOrder();
this.Base.Document.Insert(head);
I have formA where I have "_reviewer" field, which is text/editable. The field is populated when the save button is clicked, the button has the following code:
pick := #Name([CN];#PickList( [Name]));
#SetField("_reviewer"; pick );
#If(#Command([FileSave]);
#Do(
#MailSend(pick;"";"";"Subject";"Body";"";[IncludeDoclink]);
#Command([CloseWindow]);
#StatusBar("Success.")
);
#StatusBar("Fail!"));
I have viewA where document should be shown if the current user is the same as the person in '_reviewer' field, the code in View Selection is:
LCName := #LowerCase(#Name([CN];#UserName));
LCPeople := #LowerCase(_reviewer);
SELECT form = "formA" & (#Contains(LCPeople; LCName))
I have another viewB, where I can see all documents, and one of the columns is '_reviewer'. Now the issue is, even though on viewB I see that John Doe is reviewer for a documentA, the documentA is not shown in viewA when John Doe is logged in as the current user. The tricky part is, documents sometimes show up in viewA, and sometimes they don't, even though I repeat the same steps when creating the document. Having this behavior is unacceptable. Is there some other way to parse the current user and the user picked from #PickList, or some other way to check if the two are the same?
Use an embedded view in a Page like suggested in your last question. This time first categorized column would be #LowerCase(_reviewer) and "Show single category" would have formula #LowerCase(#Name([CN];#UserName)). The view selection is SELECT form = "formA".
You can't use user specific functions like #UserName in public view's selection formula.
Also note, that the user can save the document by pressing Ctrl+S or by closing the window and selecting Yes when prompted. They don't have to use your Save button. If there's really something that must happen before the document is saved, it must be done in the form Querysave event. If it has to happen after the document is saved, it must be in the Postsave event. Kudos for checking the return value of the save command though!
I have a form that has several fields that update based on combo boxes. The first combo box uses #DbColumn to pull the first column in a view. The second combo box pulls the second column in the same view based on the the selection of the first combo box. That works fine. The issue is; I have several succeeding computed fields that use the selection from the second combo box to pull from the same view's, succeeding columns. Those computed fields are not working. I thought I could merely use an #DbLookup command in Javascript to call the values from the view but it is not working.
Here is the javascript code for the first combo box (pretty simple):
#DbColumn(#DbName(), "PLBV", 1)
Here is the second combo box code:
var vendor = getComponent("POVendor").getValue();
var items = #DbLookup(#DbName(), "PLBV", vendor, 2);
if (#IsError(items))
return "Please select a Vendor first";
else
return items;
Both of these routines work exactly as I want. Here is the issue. I have three more fields that should be populated based on the value of the second combobox. It doesn't work. I'll give you the code but it's really basic.
var item = document1.getItemValue("Item_1");
var cost = #DbLookup(#DbName(), "PLBV", item, 3);
return cost;
This code returns a blank value (nothing shows up in the field). What am I doing wrong?
If you are trying to access the item before the document has been saved then you will need to use the following code:
var item = getComponent("Item_1").getValue();
var cost = #DbLookup(#DbName(), "PLBV", item, 3);
You might need to use getSubmittedValue() rather than getValue() depending upon the validation settings of the document.
Hope this helps.
Matt
The problem stemed from me trying to call the value of a column from the same view I populated the second combo Box. That view has the first column categorized by the Vendor Name. The second column (the column I used to populate the second combo box) was a list of products offered by that vendor. That part worked fine. However; when I tried to call the value of the third columnm from the same view based on the value of the second combo box (the product), I got nothing.
I have a separate view that is a complete list of products without being categorized by the vendor that offers the product. I called colunms from that view based on the product name from the second combo box & all of my computed fields worked. Now my only issue is going to be, what happens when two different vendors use the same product name for two different products? I'll cross that bridge when I come to it. Thanks for all the help from everyone. It may not have solved the surfase issue but it gave me a much more in-depth understanding of what goes on behind the scenes.