PDA

View Full Version : How to lookup and fill in data in repeating section?


ABC123

ChilliCrab
02-25-2014, 05:44 AM
i retrieve value from sql, and display data in repeating section with the same primary key?
if i have 3 record with the same primary key and display in repeating section
how to display the record?

Michael1954
02-25-2014, 05:50 AM
Please can you give more details.


If you use data binding the normal way to approach this would be to have header information and Item Information.

Do you have the primary key from another (Third table)?
Are you talking about a foreign key? ( The field that links header to Item)

Michael

ChilliCrab
02-25-2014, 10:58 PM
Inv Table(InvNo, DocDate, Customer)
OrderItem Table (OrderItemNo, ItemName, Qty, Price, InvNo)
this two table are link, the relationship is one to many
i want show OrderItem Table in repeating section

Michael1954
02-26-2014, 04:17 AM
Good Morning CC

I have made a video to help. http://www.youtube.com/watch?v=IhZlqJobyVk

If you have any problems understanding, or you need more information just tell me the time segment and I will elaborate.

I am not sure what you are trying to do.

I have built a grid of the Invoices, I then put a button on each line of the grid and called a UX component to display the Info.

If you wanted you could do everything in a UX but if you have 1,000+ Invoice records you probably want to find the relevant invoices and then make your choice.

This is the true power of Alpha.

I created 2 tables (In Alpha)
I entered the data
I made a grid and a UX component.
I then made a video of the whole event.

The total time was about one hour.

Michael

ChilliCrab
02-26-2014, 04:49 AM
i search the purchase order no then will showing the data in repeating section...i using lookup and fill in action, but just showing one record in repeating section only...
37734

ChilliCrab
02-26-2014, 04:52 AM
37735

Michael1954
02-26-2014, 06:05 AM
Hi CC

I think your approach is slightly flawed. http://www.youtube.com/watch?v=L7lf1Iw1arA

I would suggest that you can achieve the same thing with my method.

Let me know if you need more help.


Michael

ChilliCrab
02-28-2014, 03:12 AM
if get data from unbound database and show in repeating section???

Michael1954
02-28-2014, 10:01 AM
Hi

CC I could not make it work with unbound tables.

I am trying to see if I can do it with a5_XB_RunGenericComponent(p) but at the moment I have not got the component to work.

You can use a list control to display the records and then popup a dialogue to edit a row.

You can embed an editable grid.

If you don't need to edit then it is easy to display with a5_mergeIntoTemplate.

Michael

ChilliCrab
03-11-2014, 12:49 AM
Michael are you know how to write add row in repeating section with xbasic ?
in javascript is : {dialog.object}.addRepeatingSectionRow('CONTAINER_2');
but in xbasic how to write it?

Michael1954
03-11-2014, 03:57 AM
Hi Chilli

I don't know but if it is important post a new message.

If you use a5_mergeintotemplate() you can build any Html you like; to build Alpha's functionality would be involved.

This may be the best route, but then you need to be good in Html.


Michael

See this thread http://msgboard.alphasoftware.com/alphaforum/showthread.php?109942-how-to-add-repeating-section-s-row-in-XBasic

This thread seems to answer the question http://msgboard.alphasoftware.com/alphaforum/showthread.php?108036-UX-Repeating-Section-Xbasic-Loop-Code

More Here http://msgboard.alphasoftware.com/alphaforum/showthread.php?105669-Repeating-Section-Row-Count-And-Access-To-The-Number

Yet More http://msgboard.alphasoftware.com/alphaforum/showthread.php?102854-Repeating-section-variable-problem

GGandhi
03-11-2014, 06:23 AM
in javascript is : {dialog.object}.addRepeatingSectionRow('CONTAINER_2');
but in xbasic how to write it?
why?
dialog object is getting the information from the user and hasn't done anything with that information yet till it is submitted to the server.
javascript code runs on the user's browser. xbasic runs on the server.
so it will be appropriate to use the javascript code unless of course you want to submit each time and a new row is added automatically.
in that case it is lot easier to do with the grid and keep the repeating section to a single row and add a new row as you go on.

take a look at this, done with a grid:
http://screencast.com/t/svlgt4cIf3k
no voice in this computer. but you will get the idea.