How to Pre-fill input fields automatically


Hi

I have made a reporting form to be filled by users but there's one field I want it to be pre-filled by the systems automatically, which is the category field.

For Example:

If I open a staff report, the category should be filled with "staff" and if I open client report it fills it with "client".

I already made an input parameter and linked it to the input field, but still no luck.

Hi Faris,

As per the mentioned requirement in your post, I do have two thoughts as solution

Solutions:

1) If the Input widget i.e Input_Category should get pre-filled with the value that is passed as an input parameter value via Category variable - Why not set the Input_Category Input Widget variable as category (i.e. Input Parameter Variable)

2) If you are not willing with the first option --> Define an OnAfterFetch Event for GetOneClickReportyId Aggregate and on conditional basis introduce an assign node with the below mentioned assignment statement

GetOneClickReportyId.List.current.oneclickReport.Category = category

  

Hope this helps you!


Regards,

Benjith Sam

Benjith Sam wrote:

Hi Faris,

As per the mentioned requirement in your post, I do have two thoughts as solution

Solutions:

1) If the Input widget i.e Input_Category should get pre-filled with the value that is passed as an input parameter value via Category variable - Why not set the Input_Category Input Widget variable as category (i.e. Input Parameter Variable)

2) If you are not willing with the first option --> Define an OnAfterFetch Event for GetOneClickReportyId Aggregate and on conditional basis introduce an assign node with the below mentioned assignment statement

GetOneClickReportyId.List.current.oneclickReport.Category = category

  

Hope this helps you!


Regards,

Benjith Sam

 

I will try the first solution first to see if it works, but will it save the input variable in the database in the category field?

It did not work for me, it wasn't saved in the database.

About the second method, sorry for the dumb question but who to create a OnAfterFetch event?

Faris Abdullah Almozini wrote:

It did not work for me, it wasn't saved in the database.

About the second method, sorry for the dumb question but who to create a OnAfterFetch event?

 You need to assign this variable to database opreation where you are creating/Save a report.



Regards
Rahul Sahu

Rahul Sahu wrote:

Faris Abdullah Almozini wrote:

It did not work for me, it wasn't saved in the database.

About the second method, sorry for the dumb question but who to create a OnAfterFetch event?

 You need to assign this variable to database opreation where you are creating/Save a report.



Regards
Rahul Sahu

It still did not save, here's what I did:

 

I added a variable to the create/save here:

and in the value I added this:

GetOneClickReportyId.List.Current.OneClickReport.Category = Category

Solution

Faris Abdullah Almozini wrote:

Rahul Sahu wrote:

Faris Abdullah Almozini wrote:

It did not work for me, it wasn't saved in the database.

About the second method, sorry for the dumb question but who to create a OnAfterFetch event?

 You need to assign this variable to database opreation where you are creating/Save a report.



Regards
Rahul Sahu

It still did not save, here's what I did:

 

I added a variable to the create/save here:

and in the value I added this:

GetOneClickReportyId.List.Current.OneClickReport.Category = Category

 

as i am seeing you assign wrong 

Change this assign value to interchange-



Regards

Rahul Sahu

Solution

Rahul Sahu wrote:

Faris Abdullah Almozini wrote:

Rahul Sahu wrote:

Faris Abdullah Almozini wrote:

It did not work for me, it wasn't saved in the database.

About the second method, sorry for the dumb question but who to create a OnAfterFetch event?

 You need to assign this variable to database opreation where you are creating/Save a report.



Regards
Rahul Sahu

It still did not save, here's what I did:

 

I added a variable to the create/save here:

and in the value I added this:

GetOneClickReportyId.List.Current.OneClickReport.Category = Category

 

as i am seeing you assign wrong 

Change this assign value to interchange-



Regards

Rahul Sahu

 it worked! thanks