Powerapps automatic ID numbering - patch

I am doing an listing software, that asks for user input, and puts the data to a spreadsheet. I am having trouble with the id system. It works fine, when I add an item to the list. It increases the ID number with 1. But I need it to also automatically decrease the numbers, if I delete one of the items from the list. And I do not have any idea on how to do that. I use this code `Patch(Taulukko1;Defaults(Taulukko1);
{ID:CountRows(Taulukko1.ID)+1})ยด to add an item to the list. Thanks in advance

You need to give some more details. For example, if you have 500 records, and you remove record 450, should all records above 450 have their ID lowered by 1?
Its going to excel? You can add the row value of the item as the idea via Power Automate or in the spreadsheet itself, and PowerApps will pick that row up and automatically fill it.

Related

check duplicate values in oracle forms multi record block

What I wanted is to display an alert when I move to the next row if the record that I inserted is already one of the records in the multi record block.
and in what trigger must I put it?
There are several options you can use.
One is to POST values entered (in WHEN-NEW-RECORD-INSTANCE) trigger. It will, well, post everything you entered so far. Then, you can write a WHEN-VALIDATE-ITEM trigger which SELECTs from that table and checks whether such a value already exists. Alternatively, if there's the UNIQUE CONSTRAINT on that (those) column(s), database will do its job itself, i.e. raise an exception.
Another option is to literally loop through all rows in a block and compare the first row's value with all the others, then the second row's values with all of them, etc.
Or, you can use a Record Group (usually used for Lists of Values). Basically, you'd check whether value you entered exists in a record group. More info, along with a FMB file, on Craig's blog.
Or, you can use calculated items, as described enter link description here (FMB attached as well).
As you can see, quite a few ways to do that; explore each of them and pick the one you find the most useful / attractive / easy to implement.

Adding a user-filled value as well as a pick value for google appmaker

I would like to define a field, where there is a list of allowed values as well as give user the option to type it in. For example, I list a bunch of previous jobs that the applicant can have, plus have them pick other and fill it in as well.
Is it possible to do this with one field or do I need two fields where the user has to type it in? Is there a doc. or sample or tutorial I can look up? Thanks.
Here is a super simple Tags sample:
https://drive.google.com/open?id=0BxtQI4fTAVQqcUx4OUJfQ1JYV2c
To cover your exact use case you just need to:
Add logic to check if record already exists
1.1 If record doesn't exist, then create one
Create relation between records
If you don't care about duplicates in your database, then you can skip step 1 and always do 1.1 and 2.

Table input for view

I would like to have the user enter order items on my order form as a table where they input the Qty and Prod #. I've not programmed with that type of field so a blank line would initially display for a new order. They would type a Qty and an item number in the fields and hit enter. When they hit enter from either field, what do I program to check the validity of the two fields. Plus I need the item number to be a drop down/type ahead field. Does anyone have an example of this type of thing they could send me? It would be looking at a view in the product catalog db. Also, after they enter an item to order, that "doc" should get stored/saved and a new blank line should open up.
What type of control do I need to use and should these items be stored in their own form or on the main order document? Could use some guidance here. Thanks.
The question you have is a little broad but I will make a couple suggestions if I can.
You have the main order doc. Then a repeat control with each item. Filter each item by a uniqueID that allows you to join the main doc to the child docs. Each item should be a separate document. You then need to make the items in the repeat control editable.
There is a lot of things going on here and I think you need to get started somewhere. I think the first step is to do a repeat control with response documents.Xpages, Inherited documents in view panel by using #Unique

Trying to get a text box in access to display the latest row in a query on button press

I have this code for the text box Control Source in Access:
=DLookUp("[Lot Number]","[Lot Number Generator Table Query]")
but that will only display the first row generated in the query. I need to get the latest one generated displayed. I've tried switching the ascending/descending order with no change.
Assuming LotNumber is sequential and that there are two tables to consider, try:
=DLookUp("[Lot Number]","[Lot Number Generator Table Query]","[Lot Number]=" &
Dmax("[Lot Number]","[Some Table]"))
Or much more simply, if there is only one table:
=Dmax("[Lot Number]","[Lot Number Generator Table Query]")
This is not safe in a multiuser environment or when Lot Number is an autonumber.
See also Domain Aggregate Functions

InfoPath Repeating Tables: Force all rows to have same value for one column

Does anyone know a way to have all the rows of one column of a repeating table to always have the same value?
Say the user changes the value in the first row for that column, then all the other cells in that column change to have the new value. (Preferably this will happen if a user changes any cell in the column, not just the one in the first row, but just the first row would be fine if that's all that's possible).
I have access to both InfoPath 2007 and InfoPath 2010 so can use either. The form submits data to and receives data from an SQL Server database. Code is fine if this requires it.
You basically want to change the field from a repeating field to just multiple copies of the same field (since you want it to always be the same there is no point in storing multiple versions).
On the data source tab, all the fields that you put in the repeating section are in a group folder with the little repeating icon on it. Right click on the field you want to be non repeating and choose move. Put it anywhere outside the repeating group folder (the encompassing folder is usually a good choice but it can be anywhere). The field on the design surface will now show a little info box that says "this item can't be repeated" (or similar).
Now you just have multiple copies of the same field - so if you change any one of them they will all update to reflect the value.

Resources