How can I automatically make new tag in Mit App inventor when I want to add new items to TinyDB - app-inventor

I have max limit of 3 items I can add in database, and I can add the items in DB whenever I want to.
How can I make it so when I have for example already 1 item in database and I want to add another one, it makes a new tag automatically?
code blocks
For now I was trying to make a simple if statements to check if there is something under that tag, but it doesn't seem to be working.

The correct logic for the checkDB procedure would be
if not is text empty ...
then ...
you can find the not block in the Logic drawer and the is text empty block in the Text drawer
also the text in the socket valueIfTagNotThere should be an empty string

Related

Oracle Forms Builder: Cannot Execute Query

I am using this code fragment:
BEGIN
GO_BLOCK('COMPANY_PRODUCTS');
EXECUTE_QUERY;
END;
in WHEN-NEW-FORM-INSTANCE of my form module.
I also changed the text items of my data block into display items.
The problem is that when I start running my form module, it displays an error stating:
FRM-40106: No navigable items in destination block.
It doesn't have "Enabled" and "Keyboard Navigable" property.
The reason I changed it to display items is because I don't want the user to click and edit the text on the item.
Is there any way can I get through this problem? or should I just stick with text items?
Screenshot: Form Module on Web Browser
make your destination block's all item Display Item, except leave one of them as Text Item ( preferably the first one in the physical sequence of items [topmost or leftmost]). And then, set that text item's Update Allowed and Insert Allowed property to No from Database section of Property Palette.

TinyDB enter and display text in mit app

in MIT App Inventor how can I do this?
I want to enter in a text-box a name and in another one an ID and use the same button to save data. The data entered must survive an app restart, and to be able call it somewhere else in app.
It is possible/difficult ? I mean the names and ID's can be many. After that how can I call a specific ID from the list?
Here is a screenshot! Thank you!
Create two empty lists, one for names and one for IDs. And data to them on button press.
Create a tinyDB element. and store those data to that with two different tags, one for name and another for ID.
For you to understand it better, here is the screenshot of the blocks.
For getting all new entries in new line, do this:
Front End of the app:
Hope it will help you

Position a form on a form in vb6

I need to open a second form and position it in a particular location on the first form opened.
Explain: I added a panel to the original form and as I was putting controls on it, I got a message that I could not add any more controls. So...
There is an existing panel that I need to cover up with a second form and have it remain covered even if the original form is dragged about the screen. The second form will cover it, but I need to know how to position it in reference to the first form.
The only references I can find are how to position it on the screen, not another form.
There's certainly no easy way to do that (a form can't host another form). The limit you encountered was the max number of named controls you can have on a form (254, see https://msdn.microsoft.com/en-us/library/aa240865(v=VS.60).aspx).
However, a control array only counts once to that limit. So instead of adding a new control (for instance text boxes) for every input field, add them as new elements of a text box array. The difference in code is that you'll reference the text boxes by index instead of unique name (you can use constants as index parameters to identify the different input fields, such as name, address, etc).

Xpages valuePicker add value

Is there a way to add a field into the valuePicker with the possibility of adding new values in it? The valuePicker get's the values from a view, and I wouldn't want to add another addButton to add some values withing that view, in separate way. I would like a dialogBox like the valuePicker + the option to add new documents withing it. It is possible?
That functionality isn't available in the Value Picker. It's unlikely to be added, because of the variety of dataProviders, which makes it difficult to know where to add the option to make it available to other documents, and also ensure validation of options.
Typeahead on an Edit Box control allows you to add entries not in the list.
Alternatively, you can add a separate Edit Box to your XPage to include a value not in the list. But if you want to store the new option in the same field, you'll need to write the code to add the option to the source of the list. E.g. if it's the dataProvider of your Value Picker is a dominoViewValuePicker, you'll need to create a document in that view as well; if it's a simpleValuePicker, you'll need to compute the options so they also look to this field. Otherwise, when the user edits the document again, the option will not be available in the list, so may get removed.
Why do you want the user to insert new values into a field in valuePicker? Instead, let the user add the new value direct into the field which is the valuePicker related to.

how to fill another text item

I am very new in oracle forms so my mind is very very confused. I have 2 text items in the begining and at the end of the form i have multi text item like grid view. When i push the button the system should get and add the information to the grid view but my programme is working like that. it gets the information and add the information in the first place of the grid view, when i add second information it deletes the first row and add it in the first place. it should keep the last situation.
If for example BLOCK_NAME is your multi text item, TEXT_ITEM1 is your first text item and TEXT_ITEM2 is your second text item, you can write the following code in when-button_pressed:
go_block('BLOCK_NAME');
first_record;
:BLOCK_NAME.COLUMN1 := :TEXT_ITEM1 + :BLOCK_NAME.COLUMN1;
last_record;
:BLOCK_NAME.COLUMN1 := :TEXT_ITEM2 + :BLOCK_NAME.COLUMN1;
commit;
good for two items only
if the items are more then 2 then better user these command with in loop
and use next_record instead of last record
and check for :system.last_record true
if true then exit
else
continue working

Resources