Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open new form in a separate application #256

Open
MadsCastle7 opened this issue Aug 6, 2024 · 13 comments
Open

open new form in a separate application #256

MadsCastle7 opened this issue Aug 6, 2024 · 13 comments

Comments

@MadsCastle7
Copy link

I am using your FormView example to view a dictionary that i've created in a separate application.

Do you have a method to open a from for a particular row in edit mode, or open a new form dynamically from a separate application?

@MadsCastle7
Copy link
Author

I have worked out how to open a new blank form in a separate application. Do you have a method of returning the id of the row that has been inserted upon save?

@LucioPelinson
Copy link
Member

Hello, @MadsCastle7
Where and how do u like to return the generated Id?
Would you have an example of what you are trying to do?

@MadsCastle7
Copy link
Author

I would like the Id to be generated after an InsertAsync. By way of example, I may wish to complete a form about the details of a hospital bed. Once i have completed those details, I then need the returned Id in order that i can link the hospital bed to a patient. The patient information may have been taken from somewhere like an API and would not be anythnig to do with Dynamic Forms.

See attached
JJMaster

@MadsCastle7
Copy link
Author

i note that EntityProviderBase.cs goes someway to achieving this, but the Id is not returned.
image

@MadsCastle7
Copy link
Author

Hi Lucio, i've just noted that the Dictionary item is passed by reference and therefore we can access the new identity seed that has been added from there. I suppose it wouls be nice if the method returned the id though

@LucioPelinson
Copy link
Member

@MadsCastle7, you can get the Id by reference.
After the insert command the id will be in the values hash.

Ex.:

// after insert command
var myId = values["id"];

If you are using procedures, check if after the insert command at procedure it's returning the id variable.

Example:

...
IF @TYPEACTION = 'I' 
	BEGIN 
		INSERT INTO [TB_TEST] (
			[name],
			[age])
		VALUES (
			@name,
			@age)
		SET @RET = 0; 
                 OUTPUT Inserted.id --THIS LINE IS IMPORTANT
	END 
...

@LucioPelinson
Copy link
Member

Hi Lucio, i've just noted that the Dictionary item is passed by reference and therefore we can access the new identity seed that has been added from there. I suppose it wouls be nice if the method returned the id though

Yes, we have been thinking about this for a long time, but this will generate a big breaking change.

@MadsCastle7
Copy link
Author

thanks for the replies, in addition can you please tell me if its possible to create additional custom field component, for example, i notice there is no Check Box List Component

@MadsCastle7
Copy link
Author

The logging code uses inline SQL, are there any plans for this to be replaced with Stored Procedures?

@LucioPelinson
Copy link
Member

The logging code uses inline SQL, are there any plans for this to be replaced with Stored Procedures?

Yes, it is in development at 4.3 version

@LucioPelinson
Copy link
Member

thanks for the replies, in addition can you please tell me if its possible to create additional custom field component, for example, i notice there is no Check Box List Component

No yet... any interfaces is missing

But you can use a ComboBox Component and enable mult select option
image

or

Use a Relation
https://md.jjconsulting.tech/articles/tutorials/relationship.html

@MadsCastle7
Copy link
Author

The logging code uses inline SQL, are there any plans for this to be replaced with Stored Procedures?

Yes, it is in development at 4.3 version

Morning Lucio, do you have timescales for version 4.3?

@LucioPelinson
Copy link
Member

LucioPelinson commented Aug 12, 2024

The logging code uses inline SQL, are there any plans for this to be replaced with Stored Procedures?

Yes, it is in development at 4.3 version

Morning Lucio, do you have timescales for version 4.3?

The release of version 4.3 will be on 2024-08-28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants