Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: using show document to display another record in the form section

  1. #21
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,101
    Hi,

    Thanks for better screenshot. I can see strange things in debuger trace:

    "pageage1.section1

    Name:  Screenshot - 05.01.2020. , 18_58_33.png
Views: 36
Size:  14.2 KB
    Last edited by josipradnik; 2020-01-05 at 12:07.

  2. #22
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Josipradnik,

    I have corrected this typo in my previous reply to Berry. The problem is that I don't know why the two parameters value of mydataselect function are undefined when I use message box function to test whether any value exits in the button caption and text parameters of the mydataselect function.

    Thanks & Best Regards

  3. #23
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,808
    Study the examples. That is what they are there for. To help you learn.

    Open example_querypicker and look at the "Data" URL.

    lib:/querypicker.rsp?web=true&dialog=false&dialogpanel= false&showbuttons=true&buttons=Approve,Deny,View Details&onbuttonclick=myButtonClick

    onbuttonclick has no ().

    See below: example_querypicker

    Name:  Screen Shot 2020-01-06 at 7.53.39 AM.jpg
Views: 38
Size:  103.5 KB
    Last edited by barrymavin; 2020-01-05 at 18:58.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #24
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Barry,

    I am having difficulty finding any errors from line six. So can you please help me out?

    Name:  capture101.jpg
Views: 34
Size:  70.0 KB

    Thanks & Best Regards

  5. #25
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,808
    Package up your App and submit a ticket. The forums are not really suited to hand holding, training is more suited to that.

    Did you study the example_querypicker app?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #26
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Barry,

    I just submitted a ticket for that app.

  7. #27
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,882
    Hi Wj
    I've approached this problem contrariwise...

    On my Quality Management System I've planned to open the standard section record by record.
    Then, I've used the standard "Quary Picker" to permit at the user to search the right record, then, come back to the editor.
    See the following image.
    Name:  2020-01-07 10_41_44-Lianja App Builder v5.2Beta9 [lsf_test] - UTF-8 - sep - Licensed to Soft up .jpg
Views: 30
Size:  49.7 KB
    Name:  2020-01-07 10_42_32-Lianja App Builder v5.2Beta9 [lsf_test] - UTF-8 - sep - Licensed to Soft up .jpg
Views: 29
Size:  70.6 KB
    Name:  2020-01-07 10_43_23-Win 10 SonicWall - 104 - PAL - Varem - Indinvest - GLM [In esecuzione] - Ora.jpg
Views: 29
Size:  51.0 KB
    If you like it, I can share the code.

    ciao
    Fabio

  8. #28
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi phabio,

    Thanks for sharing! I would love to see how you did it.

  9. #29
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,882
    on Section properties, enable the search icon:
    Name:  2020-01-07 16_35_31-Lianja App Builder v5.2Beta9 [lsf_testinventtable] - UTF-8 - sep - Licensed .jpg
Views: 28
Size:  61.9 KB

    on the custom search delegate, put the code:
    OpenMySectionTablePicker(this, 'InventTable', 'ItemId,ItemName,ItemType,NameAlias,Configurable,I temGroupId')
    where 'InventTable' is the name of the table
    and 'ItemId,ItemName,ItemType,NameAlias,Configurable,I temGroupId' the comma separated field to display
    Name:  2020-01-07 16_36_04-Lianja App Builder v5.2Beta9 [lsf_testinventtable] - UTF-8 - sep - Licensed .png
Views: 27
Size:  22.2 KB

    then, create a library or put this code on the app:
    Code:
    ***************************************************************
    proc OpenMyTablePicker(_this, _tableLookup, _fields)
    
    	public Defaultnamedparameters
    	Defaultnamedparameters = ""	
    
    	namespace MyTablePicker
    	public oActiveSection, oActivePage, oActiveField
    
    	oActiveField = _this
    	
    	m_fieldId = oActiveField.id
    	
    	oActiveSection = lianja.get(oActiveField.sectionid)
    	
    	oActivePage = lianja.get(oActiveSection.pageid)
    	
    	m_pagesectionfieldid = oActivePage.id + "." + oActiveSection.id + "." + m_fieldId
    	
    	m_field = Lianja.GetElementByID(m_pagesectionfieldid)
    		
    	laFields = explode(",", lower(_fields))
    		
    	m_tableName = lower(_tableLookup)
    	m_databasename 	= database()
    		
    	m_database 				= "database=" 		+ m_databasename
    	m_table 				= "table=" 		+ m_tableName
    	m_tabletitle 				= "tabletitle=" 	+ "Lista"
    	m_selectcolumn 				= "selectcolumn=" 	+ laFields(1)
    	m_columncount 				= "columncount=" 	+ "0"
    	m_columntitles 				= "columntitles=" 	+ "Liste"
    	m_columns 				= "columns=" 		+ m_tableName + "," + laFields(1) + "," + laFields(1) + "='%7B%7D'"
    	m_columnsorderby 			= "columnsorderby=" + laFields(1)
    	m_picklist 				= "picklist=" 		+ m_tableName + "|" + lower(_fields) + "|" + laFields(1) + "='%7B%7D'"
    	m_showcolumns 				= "showcolumns=" 	+ "false"
    	m_pagesize 				= "pagesize=" 		+ "10"
    		
    	m_par = m_database + "&" + m_table + ;
    					"&" + m_tabletitle + ;
    					"&" + m_columntitles + ;
    					"&" + m_picklist + ;
    					"&" + m_columncount + ;
    					"&" + m_columns + ;
    					"&" + m_selectcolumn + ;
    					"&" + m_showcolumns + ;
    					"&" + m_columnsorderby + ;
    					"&" + m_pagesize
    	
    	Lianja.showQueryPicker("Ricerca Distinta", "MyTablePickerCallBack()", m_databasename, m_tableName, m_par, 800) 
    		
    endproc
    
    ***************************************************************
    function MyTablePickerCallBack(key, value)
    	private m_page, m_section, m_field
    	
    	m_section = MyTablePicker.oActiveSection
    	m_page = MyTablePicker.oActivePage
    	m_field = MyTablePicker.oActiveField
    	
    	m_thisSource = m_field.ControlSource
    
    	m_field.text = value
    	m_field.value = value
    	
    endfunc

  10. #30
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Phabio,

    Thank you so much for sharing this code with me!

    Best Regards,

Page 3 of 3 FirstFirst 123

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us